BookmarkSubscribeRSS Feed
deleted_user
Not applicable
proc export needs a nonames option/statement to allow user to suppress printing of SAS dataset column names on an output file.

For example:

proc export data=mysasdata
outfile="c:\mydata.csv"
dbms=csv
replace
;
run;

Presently, there is no option or statement that will allow the user to suppress printing of the SAS data set column names as the first record of the output file.
2 REPLIES 2
deleted_user
Not applicable
> proc export needs a nonames option/statement to allow
> user to suppress printing of SAS dataset column names
> on an output file.
>
> For example:
>
> proc export data=mysasdata
> outfile="c:\mydata.csv"
> dbms=csv
> replace
> ;
> run;
>
> Presently, there is no option or statement that will
> allow the user to suppress printing of the SAS data
> set column names as the first record of the output
> file.

for a short (5-line) work around (while you wait and hope ? )

data _null_ ;
file "output file path&name -quoted" dsd lrecl= 30000 ;
set your.dataset ;
put ( _all_ )( : ) ;
run ;

it seems short enough not to need wrappng in a macro !

Good Luck

PeterC
Chiefsfan4ever
Calcite | Level 5
Just to add to Peter's comments, you would want a dsd statement to make it comma delimited


Data _null_;
file &outfile. DSD DLM = ',';
Set your.dataset;
put (_all_)(:);
run;

sas-innovate-2024.png

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.

 

Register now!

SAS Enterprise Guide vs. SAS Studio

What’s the difference between SAS Enterprise Guide and SAS Studio? How are they similar? Just ask SAS’ Danny Modlin.

Find more tutorials on the SAS Users YouTube channel.

Click image to register for webinarClick image to register for webinar

Classroom Training Available!

Select SAS Training centers are offering in-person courses. View upcoming courses for:

View all other training opportunities.

Discussion stats
  • 2 replies
  • 701 views
  • 0 likes
  • 2 in conversation