![]() | ![]() | ![]() | ![]() |
When a dynamic prompt is defined for use in a SAS® Stored Process, the Sort order field for the prompt contains the following choices:
Some prompts might ignore the Use default sort order option and present the prompt values in ascending sorted order, instead of retaining the order of the variable values in the data source.
Consider the following example, which illustrates the problem:
A data source contains two variables, RESPONSE and DESCRIPTION
response description NA Not Applicable 1 Strongly Agree 2 Agree 3 Neither Agree Nor Disagree 4 Disagree 5 Strongly Disagree ? Did not respond
A dynamic prompt is created using the variable RESPONSE for the Unformatted Values column, and using variable DESCRIPTION for the Formatted (Displayed) Values column. Use default sort order is selected for the prompt to retain the order of the values in the data source.
The prompt ignores the Use default sort order option and presents the DESCRIPTION values in ascending sorted order, rather than in the order the values appear in the data source:
Agree Did Not Respond Disagree Neither Agree Nor Disagree Not Applicable Strongly Agree Strongly Disagree
To circumvent this problem, perform the following steps:
if response="NA" then sort="A"; else if response="1" then sort="B";
...and so on.
if &prompt="B" then do;
instead of...
if &prompt="1" then do;
...and so on.
Product Family | Product | System | SAS Release | |
Reported | Fixed* | |||
SAS System | SAS Integration Technologies | z/OS | 9.2 TS2M0 | 9.3 TS1M2 |
Microsoft® Windows® for 64-Bit Itanium-based Systems | 9.2 TS2M0 | 9.3 TS1M2 | ||
Microsoft Windows Server 2003 Datacenter 64-bit Edition | 9.2 TS2M0 | 9.3 TS1M2 | ||
Microsoft Windows Server 2003 Enterprise 64-bit Edition | 9.2 TS2M0 | 9.3 TS1M2 | ||
Microsoft Windows XP 64-bit Edition | 9.2 TS2M0 | 9.3 TS1M2 | ||
Microsoft® Windows® for x64 | 9.2 TS2M0 | 9.3 TS1M2 | ||
Microsoft Windows Server 2003 Datacenter Edition | 9.2 TS2M0 | 9.3 TS1M2 | ||
Microsoft Windows Server 2003 Enterprise Edition | 9.2 TS2M0 | 9.3 TS1M2 | ||
Microsoft Windows Server 2003 Standard Edition | 9.2 TS2M0 | 9.3 TS1M2 | ||
Microsoft Windows Server 2003 for x64 | 9.2 TS2M0 | 9.3 TS1M2 | ||
Microsoft Windows Server 2008 for x64 | 9.2 TS2M0 | 9.3 TS1M2 | ||
Microsoft Windows XP Professional | 9.2 TS2M0 | 9.3 TS1M2 | ||
Windows Vista | 9.2 TS2M0 | 9.3 TS1M2 | ||
Windows Vista for x64 | 9.2 TS2M0 | 9.3 TS1M2 | ||
64-bit Enabled AIX | 9.2 TS2M0 | 9.3 TS1M2 | ||
64-bit Enabled HP-UX | 9.2 TS2M0 | 9.3 TS1M2 | ||
64-bit Enabled Solaris | 9.2 TS2M0 | 9.3 TS1M2 | ||
HP-UX IPF | 9.2 TS2M0 | 9.3 TS1M2 | ||
Linux | 9.2 TS2M0 | 9.3 TS1M2 | ||
Linux for x64 | 9.2 TS2M0 | 9.3 TS1M2 | ||
OpenVMS on HP Integrity | 9.2 TS2M0 | 9.3 TS1M2 | ||
Solaris for x64 | 9.2 TS2M0 | 9.3 TS1M2 |