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 (April 2010, week 1)Back to main SAS-L pageJoin or leave SAS-L (or change settings)ReplyPost a new messageSearchProportional fontNon-proportional font
Date:         Thu, 1 Apr 2010 14:14:36 -0400
Reply-To:     "Keintz, H. Mark" <mkeintz@WHARTON.UPENN.EDU>
Sender:       "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From:         "Keintz, H. Mark" <mkeintz@WHARTON.UPENN.EDU>
Subject:      Re: What is the option in Macro to display ERROR message if macro
              variable is not Resolved
Comments: To: Amar Mundankar <amarmundankar@GMAIL.COM>
In-Reply-To:  <15c66926-a8b6-4767-9d7c-d0ec913b085c@u31g2000yqb.googlegroups.com>
Content-Type: text/plain; charset="us-ascii"

Amar:

SAS macro does not issue an error (but only a warning) because it is NOT neccesariliy an error.

In the warning message you report, the key word is APPARENT. You may actually want to %put the literal value &LAST. SAS macro can't know for sure.

Yes, there are quoting mechanisms that might avoid the warning, but I wonder if the only quoting mechanisms that would avoid the warning might also prevent sas macro from resolving &&&&&last to &last to begin with.

Regards, Mark

> -----Original Message----- > From: SAS(r) Discussion [mailto:SAS-L@LISTSERV.UGA.EDU] On Behalf Of > Amar Mundankar > Sent: Thursday, April 01, 2010 1:10 AM > To: SAS-L@LISTSERV.UGA.EDU > Subject: Re: What is the option in Macro to display ERROR message if > macro variable is not Resolved > > On Mar 29, 9:40 am, Amar Mundankar <amarmundan...@gmail.com> wrote: > > Hi all, > > The code is : > > > > options sgen; > > %let one = two; > > %let two = three; > > %let three = four; > > %let four = last; > > %put &&&&&last; > > > > Output is : > > > > 357 %put &&&&&last; > > SYMBOLGEN: && resolves to &. > > SYMBOLGEN: && resolves to &. > > SYMBOLGEN: && resolves to &. > > SYMBOLGEN: && resolves to &. > > WARNING: Apparent symbolic reference LAST not resolved. > > &last > > > > Now i want, if SAS doesn't find the Macro variable "last" then > > instead of WARNING:, it should display ERROR: message and it should > > not print the output as "&last" . > > Is there any way that sas will not output "&last' in the log ?? > > Please help. > > Thanks in Advance. > > > > Thanks and Regards, > > Amar Mundankar. > > Hi all, > Does anybody have any idea about the above mentioned question? > Is it possible in SAS or not??? > Please help. > > Regards, > Amar Mundankar.


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