- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
Hello,
I'm using RFW and I'm interested to know whether I can use a SAS table to load a script parameters when running a task.
This is a 2 variable table, parameter - value, which i would like to be loaded in the screen that pops up when executing a script for a task.
If yes, how can i do this and what the structure of the table should be?
Thank you in advance.
Andreas
Accepted Solutions
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
Hi Andreas,
RFW does not provide the means to load script parameters from a SAS table in the manner I believe you're looking for, i.e. the ability to load values for multiple parameters from a single table.
However, RFW does support the use of SAS code to define options for a given parameter. When you create a parameter via the UI and select a type of SAS Code, you can specify code that generates the options for the parameter in a data set named WORK._PARAMETER_VALUE_SET_. For example:
data work._parameter_value_set_;
length value_option $ 10;
value_option='Option 1';
output;
value_option='Option 2';
output;
value_option='Option 3';
output;
run;
In your case, your code could also pull information from your existing table or otherwise provide dynamic input when populating the WORK._PARAMETER_VALUE_SET_ data set. But you would need to specify a separate code snippet for each parameter in the script. For details, refer to the SAS Risk and Finance Workbench User's Guide (credentials required).
If batch loading parameters and values is essential, the Lua API does support loading script parameters in one step with the script_create() function. See the SAS Risk and Finance Workbench Help Center for more information about the Lua API.
Hope this helps,
Richard
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
Hi Andreas,
RFW does not provide the means to load script parameters from a SAS table in the manner I believe you're looking for, i.e. the ability to load values for multiple parameters from a single table.
However, RFW does support the use of SAS code to define options for a given parameter. When you create a parameter via the UI and select a type of SAS Code, you can specify code that generates the options for the parameter in a data set named WORK._PARAMETER_VALUE_SET_. For example:
data work._parameter_value_set_;
length value_option $ 10;
value_option='Option 1';
output;
value_option='Option 2';
output;
value_option='Option 3';
output;
run;
In your case, your code could also pull information from your existing table or otherwise provide dynamic input when populating the WORK._PARAMETER_VALUE_SET_ data set. But you would need to specify a separate code snippet for each parameter in the script. For details, refer to the SAS Risk and Finance Workbench User's Guide (credentials required).
If batch loading parameters and values is essential, the Lua API does support loading script parameters in one step with the script_create() function. See the SAS Risk and Finance Workbench Help Center for more information about the Lua API.
Hope this helps,
Richard
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
Thank you for your response.
I'll review the materials to see if I can work with lua
Andreas