Problem Note 8447: Naming data sets DATAx may cause error
PROC SORT creates a temporary data set when a DROP or KEEP data set
option is requested on the input data set. This data set is created in
the WORK library.
SAS uses the DATAx naming convention when assigning names to temporary
data sets. This consists of WORK.DATA1, WORK.DATA2, and so on.
When customers use this same naming convention, the following error may
occur because a temporary data set has already been created with the
same name:
ERROR: Data set WORK.DATAx is already open for output.
The following example will result in the above error:
data temp;
x=1;
y=2;
run;
proc sort data=temp(keep=x) out=data1;
by x;
run;
To circumvent the problem, avoid naming data sets DATAx (where x equals
a numeric value).
Operating System and Release Information
| SAS System | Base SAS | Microsoft Windows XP Professional | 8.2 TS2M0 | 9.1 TS1M0 |
| Microsoft Windows NT Workstation | 8.1 TS1M0 | 9.1 TS1M0 |
| Microsoft Windows 2000 Datacenter Server | 8.1 TS1M0 | 9.1 TS1M0 |
| Microsoft Windows 2000 Professional | 8.1 TS1M0 | 9.1 TS1M0 |
| Microsoft Windows 2000 Server | 8.2 TS2M0 | 9.1 TS1M0 |
| Microsoft Windows 2000 Advanced Server | 8.2 TS2M0 | 9.1 TS1M0 |
| 64-bit Enabled Solaris | 8.1 TS1M0 | 9.1 TS1M0 |
| Solaris | 8.1 TS1M0 | 9.1 TS1M0 |
| z/OS | 8.1 TS1M0 | 9.1 TS1M0 |
| OpenVMS Alpha | 8.1 TS1M0 | 9.1 TS1M0 |
*
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
|
| Date Modified: | 2003-09-12 08:46:27 |
| Date Created: | 2002-09-12 15:37:03 |