LISTSERV at the University of Georgia
Menubar Imagemap
Home Browse Manage Request Manuals Register
Previous messageNext messagePrevious in topicNext in topicPrevious by same authorNext by same authorPrevious page (March 2006, week 5)Back to main SAS-L pageJoin or leave SAS-L (or change settings)ReplyPost a new messageSearchProportional fontNon-proportional font
Date:   Wed, 29 Mar 2006 09:54:26 -0500
Reply-To:   "data _null_;" <datanull@GMAIL.COM>
Sender:   "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From:   "data _null_;" <datanull@GMAIL.COM>
Subject:   Re: How do I set column alignment when printing one variable per line
Comments:   To: Brandon Barrett <bbarrett@emmes.com>
In-Reply-To:   <200603291417.k2TBkJfu000362@mailgw.cc.uga.edu>
Content-Type:   text/plain; charset=ISO-8859-1

I don't now how to get NAMED put to do that but the following may be helpful.

proc contents noprint fmtlen data=sashelp.class out=work.contents(keep=varnum name format: length); format age 6.2 name $quote15.; run; proc sort data=work.contents; by varnum; run; filename putstmts temp; data _null_; file putstmts; set work.contents; put +3 'put "' name $14.-r '=" ' name @; if formatl gt 0 then do; length fmt $16; fmt = trimn(format)||trim(put(formatl,best.-l))||'.'||trim(put(formatd,best.-l))||'-l'; put fmt @; end; put ';'; run; data _null_; file print; set sashelp.class; put _page_; %inc putstmts / source2; run;

On 3/29/06, Brandon Barrett <bbarrett@emmes.com> wrote: > I am using the code below to print one record per page and one variable per > line. I would like to align the equal signs in output column 15. Any > suggestions? > > thank you, > Brandon > > > data _null_; > set complete; > file print; > put _page_; *new page per record; > put (_ALL_) ( = /); > RUN; >


Back to: Top of message | Previous page | Main SAS-L page