LISTSERV at the University of Georgia
Menubar Imagemap
Home Browse Manage Request Manuals Register
Previous (more recent) messageNext (less recent) messagePrevious (more recent) in topicNext (less recent) in topicPrevious (more recent) by same authorNext (less recent) by same authorPrevious page (May 2003, week 4)Back to main SAS-L pageJoin or leave SAS-L (or change settings)ReplyPost a new messageSearchProportional fontNon-proportional font
Date:         Sun, 25 May 2003 21:06:18 +0800
Reply-To:     Zibao Zhang <zibaozhang@HOTMAIL.COM>
Sender:       "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From:         Zibao Zhang <zibaozhang@HOTMAIL.COM>
Subject:      Re: Removing Trailing Blanks from a Macro variable and Index
Content-Type: text/plain; charset="gb2312"

Hi Patty,

%trim maybe works.

%let IndepVar=%nrstr(AAAAAA ); %let i=%nrstr(BBBBBB );

title1 "Raw Data: Varying &&IndepVar&i*****"; title2 "Raw Data: Varying %trim(&&IndepVar&i)*****";

proc print data=sasuser.heart(obs=2); run;

-OUTPUT- Raw Data: Varying AAAAAA BBBBBB ***** Raw Data: Varying AAAAAA BBBBBB*****

Kind Regards Zibao Zhang, MD

----- Original Message ----- From: Patricia Simon <patricia.simon@QUANTUM.COM> Newsgroups: bit.listserv.sas-l To: <SAS-L@LISTSERV.UGA.EDU> Sent: Saturday, May 24, 2003 5:48 AM Subject: Removing Trailing Blanks from a Macro variable and Index

> Hi, > I created a macro variable, IndepVar, that is concatenated with an Index > counter, i. When I refer to the macro variable in a chart title inside > proc gplot, it displays about 20 trailing blanks despite the trim > statement. How do I remove the trailing blanks? > Thank you, > Patty > > data _null_; > set MaxGraphVars end=eof; > i+1; > ii=left(put(i,2.)); > call symput (trim('IndepVar'||ii),_SOURCE_); > if eof then call symput('Total',ii); > run; > > %macro CreateCharts; > > %do i=1 %to &Total; > > proc gplot data=rawdata uniform; > plot &&DepVar&i * &&IndepVar&i; > title2 "Raw Data: Varying &&IndepVar&i"; > run; > quit; > %end; > %mend; >


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