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 (February 2004, week 4)Back to main SAS-L pageJoin or leave SAS-L (or change settings)ReplyPost a new messageSearchProportional fontNon-proportional font
Date:         Fri, 27 Feb 2004 13:57:39 -0500
Reply-To:     "Fehd, Ronald J. (PHPPO)" <rjf2@CDC.GOV>
Sender:       "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From:         "Fehd, Ronald J. (PHPPO)" <rjf2@CDC.GOV>
Subject:      Re: pound sign causes macro problems in Version 9.1
Content-Type: text/plain; charset="us-ascii"

> From: Dale McLerran [mailto:stringplayer_2@YAHOO.COM] > %macro testit(testparm = );

to which I responded: > Your ByGuessAndByGolly goes down in flames:

> ERROR: A bug in SAS has been encountered. > Please call your SAS representative and report the following message: > YJEVAL: Invalid comparison operator 13 encountered.

> ERROR: %EVAL function has no expression to evaluate, or %IF statement has no condition. > ERROR: The macro TESTIT will stop executing.

> I have opened a TechSupport call on this.

From: SAS Technical Support [mailto:support@sas.com] Sent: Friday, February 27, 2004 1:45 PM

OS: win2000pro Product: base OS Release: Topic: macro Product Rel: 9.1 (TS1M0) Subtopic: TSLevel:

Thanks for sending in this example. The error is due to the # present in "#SOMESPECIALVALUE#". Starting in version 9.1, # is now a special character indicating the new IN operator. I am aware of the the problems that this is now causing and have reported this to the macro developer. If an option becomes available to turn off the meaning of this character, I will send you an email. Currently the circumvention to this problem is to use a quoting function.

%macro testit(testparm = ); %*if %upcase(&testparm) = #SOMESPECIALVALUE# ; %*if %upcase(%superq(testparm)) = #SOMESPECIALVALUE# %then %put @@That is the one.; %if %sysevalf(%upcase(testparm) = %quote(#SOMESPECIALVALUE#)) %then %put @@That is the one.; %else %put @@That is not it.; %mend testit; %testit(testparm = xyz);

Regards, A Little Birdie SAS Tech Support


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