![]() | ![]() | ![]() | ![]() | ![]() |
Beginning in SAS® 9.2, you can use the the PUTNAMES= statement with PROC EXPORT to control whether or not variable names are written out to comma, tab, or delimited files. You can also use the PUTNAMES= statement with the LABEL option to write out labels instead of variable names with PROC EXPORT. By default, variable names are written to the first row of the external file (comma, tab, or delimited) when using PROC EXPORT.
Here is an example of using the PUTNAMES= statement to prevent variable names (headers) from being written to row 1 of the external file:
proc export data=sashelp.class outfile='c:\temp\classnoheaders.csv' dbms=csv replace; putnames=no; run;
Here is an example of writing out the labels instead of variable names when using PROC EXPORT:
/*Modify SASHELP.CLASS to include labels for variables*/ data newclass; set sashelp.class; label name='First Name' sex='Gender' Age='Age of Person' Height='Height of Person' Weight='Weight of Person'; run; proc export data=newclass outfile='c:\temp\classlabel.csv' label dbms=csv replace; run;
Product Family | Product | System | SAS Release | |
Reported | Fixed* | |||
SAS System | Base SAS | Microsoft® Windows® for 64-Bit Itanium-based Systems | 9.2 TS1M0 | |
Microsoft Windows Server 2003 Datacenter 64-bit Edition | 9.2 TS1M0 | |||
Microsoft Windows Server 2003 Enterprise 64-bit Edition | 9.2 TS1M0 | |||
Microsoft Windows XP 64-bit Edition | 9.2 TS1M0 | |||
Microsoft® Windows® for x64 | 9.2 TS1M0 | |||
Microsoft Windows Server 2003 Datacenter Edition | 9.2 TS1M0 | |||
Microsoft Windows Server 2003 Enterprise Edition | 9.2 TS1M0 | |||
Microsoft Windows Server 2003 Standard Edition | 9.2 TS1M0 | |||
Microsoft Windows XP Professional | 9.2 TS1M0 | |||
Windows Vista | 9.2 TS1M0 | |||
Windows Vista for x64 | 9.2 TS1M0 | |||
64-bit Enabled AIX | 9.2 TS1M0 | |||
64-bit Enabled HP-UX | 9.2 TS1M0 | |||
64-bit Enabled Solaris | 9.2 TS1M0 | |||
HP-UX IPF | 9.2 TS1M0 | |||
Linux | 9.2 TS1M0 | |||
Linux for x64 | 9.2 TS1M0 | |||
OpenVMS on HP Integrity | 9.2 TS1M0 | |||
Solaris for x64 | 9.2 TS1M0 |