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

Join us for SAS Innovate April 16-19 at the Aria in Las Vegas. Bring the team and save big with our group pricing for a limited time only.

Pre-conference courses and tutorials are filling up fast and are always a sellout. Register today to reserve your seat.

 

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
  • 666 views
  • 0 likes
  • 2 in conversation