Date: Wed, 27 Aug 2008 13:56:54 -0400
Reply-To: Suren gc <gc_suren@YAHOO.COM>
Sender: "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From: Suren gc <gc_suren@YAHOO.COM>
Subject: Resolving a numerically valued macro
Here is my problem:
I created a macro variable that has values starting with number. When i try
to do %if %then evaluations on the macro values then gives me an error
message saying :
WARNING: Apparent symbolic reference FORM not resolved.
ERROR: A character operand was found in the %EVAL function or %IF condition
where a numeric operand is required. The condition was: &form=01-Pulp-Pine
ERROR: The macro ABC will stop executing.
38 run;
Could you please let me know how to go about solving this
data abc;
do i=1 to 10;
output;
run;
%macro abc;
%do i=1 %to 2;
%if i=1 %then %do; %let form=01-Pulp-Pine; %end;
%if i=2 %then %do; %let form=02-Hdwd;%end;
%if &form=01-Pulp-Pine %then %do;
data efg;
set abc;
run;
%end;
%end;
%mend;
%abc;
run;
Thanks
Suren