Problem Note 56141: PROC EXPORT produces a comma for the first variable name on only the first row even if the first variable name is specified in the DROP= option
The EXPORT procedure writes out a comma for the first variable name on the first row of the external file even though the first variable name is listed in the DROP= data set option. The erroneous comma is written out only to the first row of the external file.
The example code below replicates the problem:
proc export data=sashelp.class(drop=name)
outfile = 'c:\class.csv' dbms=csv replace;
putnames=yes;
run;
A snippet of the external file CLASS.CSV is shown below. This illustrates the erroneous comma at the beginning of the first row when the variable Name is listed in the DROP= data set option:
,Sex,Age,Height,Weight
M,14,69,112.5
F,13,56.5,84
F,13,65.3,98
F,14,62.8,102.5
If other variables in the SAS® data set are listed in the DROP= data set option, the variable names on the first row of the external file are correct. The problem occurs only when you drop the first variable in the SAS data set.
Operating System and Release Information
SAS System | Base SAS | Microsoft® Windows® for 64-Bit Itanium-based Systems | 9.4 TS1M0 | |
Microsoft® Windows® for x64 | 9.4 TS1M0 | 9.4 TS1M2 |
Microsoft Windows 8 Enterprise x64 | 9.4 TS1M0 | 9.4 TS1M2 |
Microsoft Windows 8 Pro x64 | 9.4 TS1M0 | 9.4 TS1M2 |
Microsoft Windows 8.1 Enterprise 32-bit | 9.4 TS1M0 | 9.4 TS1M2 |
Microsoft Windows 8.1 Enterprise x64 | 9.4 TS1M0 | 9.4 TS1M2 |
Microsoft Windows 8.1 Pro | 9.4 TS1M0 | 9.4 TS1M2 |
Microsoft Windows 8.1 Pro 32-bit | 9.4 TS1M0 | 9.4 TS1M2 |
Microsoft Windows Server 2008 R2 | 9.4 TS1M0 | 9.4 TS1M2 |
Microsoft Windows Server 2008 for x64 | 9.4 TS1M0 | 9.4 TS1M2 |
Microsoft Windows Server 2012 Datacenter | 9.4 TS1M0 | 9.4 TS1M2 |
Microsoft Windows Server 2012 R2 Datacenter | 9.4 TS1M0 | 9.4 TS1M2 |
Microsoft Windows Server 2012 R2 Std | 9.4 TS1M0 | 9.4 TS1M2 |
Microsoft Windows Server 2012 Std | 9.4 TS1M0 | 9.4 TS1M2 |
Windows 7 Enterprise x64 | 9.4 TS1M0 | 9.4 TS1M2 |
Windows 7 Professional x64 | 9.4 TS1M0 | 9.4 TS1M2 |
64-bit Enabled AIX | 9.4 TS1M0 | 9.4 TS1M2 |
64-bit Enabled HP-UX | 9.4 TS1M0 | 9.4 TS1M2 |
64-bit Enabled Solaris | 9.4 TS1M0 | 9.4 TS1M2 |
HP-UX IPF | 9.4 TS1M0 | 9.4 TS1M2 |
Linux for x64 | 9.4 TS1M0 | 9.4 TS1M2 |
Solaris for x64 | 9.4 TS1M0 | 9.4 TS1M2 |
*
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: | high |
Topic: | SAS Reference ==> Procedures ==> EXPORT Common Programming Tasks ==> Reading and Writing External Data ==> with PROC EXPORT
|
Date Modified: | 2015-07-28 10:50:22 |
Date Created: | 2015-07-08 15:05:23 |