Date: Wed, 12 Feb 1997 14:05:40 -0800
Reply-To: Jay Jaffe <Jay.Jaffe@NCAL.KAIPERM.ORG>
Sender: "SAS(r) Discussion" <SAS-L@UGA.CC.UGA.EDU>
From: Jay Jaffe <Jay.Jaffe@NCAL.KAIPERM.ORG>
Subject: Re: Delimiter File Write
Robert Schechter <robert_schechter@MERCK.COM> writes:
> I'm currently creating a flat file within
> a DATA _NULL_ SAS6.08 IBM/MVS PUT statements. My customer would like the
> "same file, only comma delimited". I'd rather not add "," between each
> variable as I'm sure they'll keep changing their minds. Any
> suggestions?
Absent a SORELY-NEEDED option on the FILE statement, you can do for instance:
data _null_;
a=1; b=2; c='See'; d='Dee'; e=3;
put ' All List-style : ' a (b--e) (+(-1) ',');
put ' or, re-ordered : ' b (c e a d) (+(-1) ',');
put 'Some same-formatted : ' a (c d) (+(-1) ',') +(-1) (b e) (',' z2.);
run;
All List-style : 1,2,See,Dee,3
or, re-ordered : 2,See,3,1,Dee
Some same-formatted : 1,See,Dee,02,03
Have fun, - j
|