Tip of the Day:February 13
sasCommunity Tip of the Day
ODS CSV and PROC PRINT can be used to easily produce a comma-delimited text file from a SAS data set with either variable names or labels in the first record of the file. You might not know that you can change the delimiter in the text file from a comma to any character you choose, for example...
ods csv file='z:\class.txt' options(delimiter='|'); proc print data=sashelp.class noobs; run; ods csv close;
will produce a pipe-delimited file (CLASS.TXT) a portion of which looks as follows ...
"Name"|"Sex"|"Age"|"Height"|"Weight" "Joyce"|"F"|11|51.3|50.5 "Jane"|"F"|12|59.8|84.5
If the ODS CSV option does not work for you, download an updated CSV tagset at the "see also" link.
Submitted By Mike Zdeb
Feel free to comment on this tip.