Date: Fri, 10 Apr 1998 22:24:48 GMT
Reply-To: Steve Gregorich <gregorich@PSG.UCSF.EDU>
Sender: "SAS(r) Discussion" <SAS-L@UGA.CC.UGA.EDU>
From: Steve Gregorich <gregorich@PSG.UCSF.EDU>
Organization: University of California, San Francisco
Subject: commas in a macro variable
Content-Type: Text/Plain; charset=US-ASCII
Hi,
I am building a SAS macro that will call
PROC CALIS. However, some of the PROC
CALIS statements require the use of commas,
as a delimiter. An example STD statement
from PROC CALIS:
STD
e1 = u1,
e2 = u2,
e3 = u3,
f1 = phi11;
What I would like to do is place the
PROC CALIS STD statement in a macro
variable that is initialized in a
%macro statement. However, the %macro
statement also uses commas as a delimiter,
but in this case commas separate macro
variables. Obviously the following code
will not yeild a macro variable called
STD with the desired syntax (as above).
%macro test
(data = _last_,
std =
STD
e1 = u1,
e2 = u2,
e3 = u3,
f1 = phi11);
Here the commas in the STD statement
are interpreted by the %macro statement
as delimiters between successively
declared macro variables. Does anyone
have any thoughts about an elegant solution?
TIA
Steve Gregorich
|