SAS Enterprise Guide

Desktop productivity for business analysts and programmers
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-white.png

Our biggest data and AI event of the year.

Don’t miss the livestream kicking off May 7. It’s free. It’s easy. And it’s the best seat in the house.

Join us virtually with our complimentary SAS Innovate Digital Pass. Watch live or on-demand in multiple languages, with translations available to help you get the most out of every session.

 

Register now!

Creating Custom Steps in SAS Studio

Check out this tutorial series to learn how to build your own steps in SAS Studio.

Find more tutorials on the SAS Users YouTube channel.

SAS Training: Just a Click Away

 Ready to level-up your skills? Choose your own adventure.

Browse our catalog!

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