Tuesday, March 13, 2012

How user can select values from a dynamic list

In SAS 9.1, the GUI prompts were not able to read the values inside a dataset dynamically. For example, let us consider a dataset named Unique Hour (UNQ_HR) which contains a variable named Unique Category Description (unq_catg_desc). Incase if Unique Category Description of this dataset gets updated every month and if it is used in GUI Prompts, then for every other month the SAS User has to follow the static "uploading of values" in GUI Prompt from the updated datasets (so that the GUI reflects updated values of dataset).

But SAS 9.2 gives a solution/ flexibility for dynamically reading updated values present inside a dataset.


SAS EG 9.1: dynamic UI cannot be created, below is the way in which a static list can be updated

1. Open the XYZ.egp


2. Click on Tools on the top right corner of the SAS EG and select Parameters Manager.

3. The Parameters Manager Window opens up showing the lists of GUI Parameters. Select "unq_catg_desc" and click on the Edit button.

4. The Edit button opens up the Edit Parameter Definition Window. Click on Data Type and Values tab towards the right.

5. The Load Values button is located at the bottom left corner. Click on it to select the SAS Server option.

6. Click on the Servers Icon (located towards the left).

7. Navigate to the path: Servers - SAS Main - Libraries - ABC

8. Locate the UNQ_HR Dataset in ABC Library and click Open button.

9. The column names of the dataset are displayed in the Select Column Window. Select the unq_catg_desc Column Name and click OK.

10. Click on Save and Close.

11. Click on Yes when the Parameters Manager Window asks.

12. Click on Close button to proceed with execution.

SAS EG 9.2: dynamic UI can be created

Pre requisite to create a dynamic UI –

We need to have the respective table in any of the path of Data source in Edit Prompt. If it is not there, then we have to register the required table in required path through SAS DI Studio.

Steps to create dynamic UI –

Step 1: Fill below param’s highlighted in red
Method for populating promt - User selects values from a dynamic list
Number of values - Multiple ordered values
Data source - The path (the path in which the dynamically readable dataset and it value is present)

Step 2: In Data source tab locate the physical path of where that table is (in our case it is ABC.unq_hr)

Step 3: Point to the table and column. Say o.k

No comments:

Post a Comment