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.
Don't miss out on SAS Innovate - Register now for the FREE Livestream!
Can't make it to Vegas? No problem! Watch our general sessions LIVE or on-demand starting April 17th. Hear from SAS execs, best-selling author Adam Grant, Hot Ones host Sean Evans, top tech journalist Kara Swisher, AI expert Cassie Kozyrkov, and the mind-blowing dance crew iLuminate! Plus, get access to over 20 breakout sessions.
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.