Good day, THE BELOW OUTPUT IS FROM THIS MACRO %MACRO ds2pipe1(dsname, outfile, title1=, title2=,mod=N,date=N,printLabels=N,zip=N); DATA _NULL_; SET WOOLWORTHyday_; RUN; DATA _NULL_; RUN; /*options noxwait; */ filename data temp; proc contents data=&dsname noprint out=_tmp_; run; proc sort data=_tmp_; by varnum; run; * to cater for no more than 100 vars; data _null_; length name label text $300; set _tmp_ end=eof; file data; if type=2 then /*rather export all as quote delimitted to be on the safe side;*/ name=name; if eof then put name ');put info1;'; else if _n_=1 then do; put 'info1= STRIP(' name'||"#"||'; /*put 'info1= (' name '||""||';*/ end; else do; put 'STRIP(' name ')||"#"||'; /*put '(' name ')||""||';*/ end; run; data _null_; file "&outfile..txt" ls=32767 %if "&mod"="Y" %then %do; mod %end;; set &dsname end=eof; if _n_=1 then do; if "&title1" ^="" then do; put "&title1"; put ; %if "&title2"^="" %then %do; put "&title2"; %end; put ; end; /*%include header;*/ end; %include data; %if "&date"="Y" %then %do; if eof then do; put ; _tod=today(); put "Date printed: " _tod yymmdd10.; end; %end; run; %if "&zip"="Y" %then %do; /*options nowait;*/ data _null_; rc=system('zip '||"&outfile..zip &outfile..txt"); run; %end; proc datasets mt=data lib=work nolist nodetails; delete _tmp_; quit; %mend; OUTPUT 14C#04799#0000011832#0000000000#00641934#0007406199999909#001#KKKONI________#ZZ____#000007000341#000000000M00223353#00000000#000563500.00#000524551.07#00000000#0240#000004996.38#000000000000 '65 BLANKS' AFTER THE LAST CHAR I WANT TO PUT MORE 65 BLANK SPACE
... View more