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 (June 1997, week 5)Back to main SAS-L pageJoin or leave SAS-L (or change settings)ReplyPost a new messageSearchProportional fontNon-proportional font
Date:   Sun, 29 Jun 1997 13:35:54 -0400
Reply-To:   "Childs, Randy" <RCHILD@ABTI.COM>
Sender:   "SAS(r) Discussion" <SAS-L@UGA.CC.UGA.EDU>
From:   "Childs, Randy" <RCHILD@ABTI.COM>
Subject:   compressing a macro variable
Comments:   To: hu.ang@RHIGROUP.COM
Content-type:   text/plain; charset=US-ASCII

Hu Ang,

I don't know of any standard macro that will completely compress all blanks. There is a macro that will trim leading and trailing blanks as well as compressing multiple blanks into a single blank: %cmpres(). If you wanted to try to index the single blanks, you can use the %index() function. You can to create the space as a macro variable as: %let e = %str( ) [with a single space between parentheses.] But I think your easiest solution is using the data _null_ step. However, you can combine the steps into one statement.

%let try = aa bb;

data _null_; call symput('try',compress("&try")); run;

A %put &try; statement results in aabb. Good luck.

Randy Childs Alpha-Beta Technology


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