Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Efficiently convert a SAS dataset into a CSV

Tags:

Can anyone tell me what is the fastest way to programmatically convert a SAS dataset into a CSV file. I know I can use a data step and output to a file etc. But is that the only way?

Thanks, Adnan.

like image 971
Adnan Avatar asked Sep 14 '10 17:09

Adnan


People also ask

How do I convert a SAS dataset to CSV?

You can use proc export to quickly export data from SAS to a CSV file. This procedure uses the following basic syntax: /*export data to file called data. csv*/ proc export data=my_data outfile="/home/u13181/data.

How can you write a SAS data set to a comma delimited file?

Writing a CSV file. If we wish to write raw data in SAS as a comma-separated file, then we can modify our outfile, specify CSV in the dbms option, and omit the delimiter line.


1 Answers

something along these lines?

proc export data=sashelp.class     outfile='c:\temp\sashelp class.csv'     dbms=csv     replace; run; 
like image 94
rkoopmann Avatar answered Sep 20 '22 18:09

rkoopmann