| 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 |
|
| 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
|