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 (August 2008, week 4)Back to main SAS-L pageJoin or leave SAS-L (or change settings)ReplyPost a new messageSearchProportional fontNon-proportional font
Date:         Wed, 27 Aug 2008 11:09:05 -0700
Reply-To:     "Choate, Paul@DDS" <pchoate@DDS.CA.GOV>
Sender:       "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From:         "Choate, Paul@DDS" <pchoate@DDS.CA.GOV>
Subject:      Re: Resolving a numerically valued macro
Comments: To: Suren gc <gc_suren@YAHOO.COM>
In-Reply-To:  A<200808271756.m7RG23t5024338@malibu.cc.uga.edu>
Content-Type: text/plain; charset="us-ascii"

From the help doc

"Macro variable names must start with a letter or an underscore and can be followed by letters or digits"

See "Rules for Words and Names in the SAS Language"

Paul Choate DDS Data Extraction (916) 654-2160

-----Original Message----- From: SAS(r) Discussion [mailto:SAS-L@LISTSERV.UGA.EDU] On Behalf Of Suren gc Sent: Wednesday, August 27, 2008 10:57 AM To: SAS-L@LISTSERV.UGA.EDU 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


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