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 (July 2001, week 4)Back to main SAS-L pageJoin or leave SAS-L (or change settings)ReplyPost a new messageSearchProportional fontNon-proportional font
Date:   Sat, 28 Jul 2001 06:46:59 GMT
Reply-To:   Michael Dixon <michael@KARMIDOX.TZO.COM>
Sender:   "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From:   Michael Dixon <michael@KARMIDOX.TZO.COM>
Organization:   BigPond Internet Services (http://www.bigpond.net.au)
Subject:   Re: problem with characters in macro %if expression
Content-Type:   text/plain; charset=us-ascii

SAS is interpreting GE as "Greater than or equal to" instead of a string of "GE". To solve this, either quote both sides of the equals sign: "&MEASURE"="GE" or %str() both sides: %str(&MEASURE)=%str(GE)

You can also see the same behaviour by substituting GE with >: %IF &MEASURE=> %then %put measure is ge and measure is &measure;

Strange behaviour, but there you go :)

Cheers Michael

On 27 Jul 2001 13:41:00 -0700, gabo@econ.berkeley.edu (Gabriel) wrotd:

>I have a problem using logical expressions with the macro language. I >have a line like this within a macro: > >%IF &MEASURE=GE %then %put measure is ge and measure is &measure; > >Now I know the macro variable MEASURE is set to FGT. When I run that >line with options symbolgen selected, I get the following inthe log >file: > >SYMBOLGEN: Macro variable MEASURE resolves to FGT >SYMBOLGEN: Macro variable MEASURE resolves to FGT >measure is ge and measure is FGT > >Why does SAS seem to think that &MEASURE=GE, when the output says >otherwise? >Thanks for the help! >Gabriel


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