Problem Note 5030: Using the DROP= (or KEEP=) option with NODUPKEY in PROC SORT may require
FORCE option
In Release 8.1 and above of the SAS System, using the DROP= (or KEEP=)
data set option along with NODUPKEY once a data set has already been
sorted may not sort the data set again. For example:
PROC SORT DATA=TEST OUT=TEST1 (DROP=KEY4) NODUPKEY;
BY KEY1 KEY2 KEY3 DESCENDING KEY4;
RUN;
PROC SORT DATA=TEST1 OUT=TEST2 (DROP=KEY3) NODUPKEY;
BY KEY1 KEY2 KEY3;
RUN;
generates the following NOTE in the SAS Log:
NOTE: Input data set is already sorted; it has been copied to the
output data set
To circumvent the problem, specify the FORCE option. For example:
PROC SORT DATA=TEST OUT=TEST1 (DROP=KEY4) NODUPKEY;
BY KEY1 KEY2 KEY3 DESCENDING KEY4;
RUN;
PROC SORT DATA=TEST1 OUT=TEST2 (DROP=KEY3) NODUPKEY FORCE;
BY KEY1 KEY2 KEY3;
RUN;
A Technical Support hot fix for Release 8.2 TSLEVEL TS2M0 for this
issue is available at:
http://www.sas.com/techsup/download/hotfix/82_sbcs_prod_list.html#005030
For customers running SAS with Asian Language Support (DBCS), this
hot fix should be downloaded from:
http://www.sas.com/techsup/download/hotfix/82_dbcs_prod_list.html#005030
Operating System and Release Information
| SAS System | Base SAS | z/OS | 8.1 TS1M0 | 9 TS M0 |
*
For software releases that are not yet generally available, the Fixed
Release is the software release in which the problem is planned to be
fixed.
| Type: | Problem Note |
| Priority: | medium |
| Topic: | Common Programming Tasks ==> Sorting Data SAS Reference ==> Procedures ==> SORT
|
| Date Modified: | 2002-06-25 12:11:22 |
| Date Created: | 2001-05-21 15:26:13 |