Date: Thu, 10 Nov 2005 17:47:42 -0500
Reply-To: Jim Groeneveld <jim1stat@YAHOO.CO.UK>
Sender: "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From: Jim Groeneveld <jim1stat@YAHOO.CO.UK>
Subject: Re: quoting portions of macro variables in first pass,
unquoting in 2nd pass
Dear Jennifer,
Well, unless the SAS syntax has changed since vs. 8.2 (which I'm still
using), the meaning of your code is clear to us but the syntax is very
wrong. That may be the cause of the warning that you get. It should be:
%GLOBAL cregion1 area;
%LOCAL i;
%LET cregion1 = AU;
%LET area = region;
%LET i = 1;
Regards - Jim.
--
Y. (Jim) Groeneveld, MSc., Biostatistician, Vitatron b.v., NL
Jim.Groeneveld_AT_Vitatron.com (replace _AT_ by AT sign)
http://www.vitatron.com, http://home.hccnet.nl/jim.groeneveld
My computer regards me as its master, but I seem to be its slave.
[common disclaimer]
On Thu, 10 Nov 2005 11:42:41 -0800, sassafras <jennifer_lin@CHIRON.COM>
wrote:
>Here's what I'm trying to do:
>
>GLOBAL cregion1 = AU
>GLOBAL area = region
>LOCAL i = 1
>
>I need to put something like "&&c&area&i" in my code. I was thinking
>that this would resolve as &cregion1 in the first pass, and then as AU
>in the second pass.
>
>But I can tell that SAS is trying to interpret &c as a macro variable
>because I get this message in the log: "WARNING: Apparent symbolic
>reference C not resolved."
>
>Is there a way to quote the ampersand in front of the c for the first
>pass, and then unquote it for the 2nd pass?
>
>Thanks in advance for your help!
>
>J
|