Hi,
I am trying to output a sas dataset into a CSV file using labels as the heades.
In the 9.1 version, if I use:
proc export data=...
outfile=...
dbms=scv replace;
I couldn't use labels as header.(I know there is a label option of proc export in 9.2 but unfortunately I am using 9.1 )
However, if I choose to use:
ods csv file=...
proc print ... label;
run;
ods csv close;
The out put quotes all data (char and numerical) which I really don't want.
Is there any way that I can output a csv file with labels as headline and no quotes in the output using version 9.1rc_?
Thanks,
Eric
Data _null_ already posted code for that to this thread.
Thanks Tom, however my problem is actually have labels but no double quotation marks in my output using either proc export or ods csv + proc print.
Why would you want the double quotes unless there is a delimiter that needs quoting?
Do you have some system that has a specialized format that it requires?
I DO NOT want the double quotes but when I use ods csv to output, SAS generate all double quotes in the output file automatically.
The problem could be simplified to:
how can I output a csv file with labels using proc export in 9.1.
So don't use PROC EXPORT. Use that data step code in the thread I referenced.
Save $250 on SAS Innovate and get a free advance copy of the new SAS For Dummies book! Use the code "SASforDummies" to register. Don't miss out, May 6-9, in Orlando, Florida.
Need to connect to databases in SAS Viya? SAS’ David Ghan shows you two methods – via SAS/ACCESS LIBNAME and SAS Data Connector SASLIBS – in this video.
Find more tutorials on the SAS Users YouTube channel.