Date: Wed, 9 Feb 2011 15:21:28 -0500
Reply-To: Gabriel Rosas <rosas.gabe@GMAIL.COM>
Sender: "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From: Gabriel Rosas <rosas.gabe@GMAIL.COM>
Subject: Re: Exporting into CSV woes...help!
Hi Rieza,
You could try this, to get the one huge CSV file you wanted in the first
place.
proc sql noprint;
select name
into :txtHeader separated by ','
from dictionary.columns
where lowcase(libname)='work'
and lowcase(memname)='nhbsmsm'
order by varnum;
select name
into :txtPut separated by ' '
from dictionary.columns
where lowcase(libname)='work'
and lowcase(memname)='nhbsmsm'
order by varnum;
quit;
data _null_;
set nhbsmsm;
file 'whatever the file is.csv'
dlm=','
lrecl=/*what it needs to be*/
;
if _n_=1 then put "&txtHeader";
put &txtPut;
run;
|