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 (November 2011, week 3)Back to main SAS-L pageJoin or leave SAS-L (or change settings)ReplyPost a new messageSearchProportional fontNon-proportional font
Date:   Wed, 16 Nov 2011 10:46:54 -0500
Reply-To:   Fatos US <fatosus@GMAIL.COM>
Sender:   "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From:   Fatos US <fatosus@GMAIL.COM>
Subject:   Re: macro statement question %let quest="...";
In-Reply-To:   <0F548D585A011E4484D77C7B095EC53F0B24C7C7@TAC-CMS001.prod.ds.russell.com>
Content-Type:   text/plain; charset=windows-1252

Hi Mark:

Thank you so much for your quick and detailed reply. But...

I did try the *%let quest=; *

but it yields *"*

I also tried *%global quest;*

it yields *" *

* *

On Wed, Nov 16, 2011 at 10:39 AM, Terjeson, Mark <Mterjeson@russell.com>wrote:

> Hi Fay, > > Your comment that the result shows &quest > does not quite fit your suggested code repair > of %let quest=; > > When you see &quest as the resolved display > for the macro variable it means that the quest > macro variable has not been declared/allocated. > When it is declared/defined with either > %let quest=; > or %global quest; > Both will yield an empty output and avoid the &quest. > > So either you didn't have the %let quest=; at the > time of your test execution or some other timing issue > is coming into play. If your 4 lines of code are inside > another macro then a "scope" issue could come into play. > i.e. if a macro variable is needed from one macro into > another or after the macro you would need to predeclare > the macro variable with %global so that the default > instance of the macro variable only being local to the > macro is made available for later use outside the scope > of that macro. > > Long-story-short, if you actually pre-create your quest > macro variable with %global quest; or %let quest=; > then you should just yield an empty output instead of > the &quest display. > > > > > > Hope this is helpful. > > > Mark Terjeson > Investment Business Intelligence > Investment Management & Research > Russell Investments > 206-505-2367 > > > Russell > Global Leaders in Multi-Manager Investing > > > > > > > > -----Original Message----- > From: SAS(r) Discussion [mailto:SAS-L@LISTSERV.UGA.EDU] On Behalf Of > Fatos US > Sent: Wednesday, November 16, 2011 7:01 AM > To: SAS-L@LISTSERV.UGA.EDU > Subject: macro statement question %let quest="..."; > > Hi everybody: > I am trying to produce web tables using the codes below > > %let topiclbl=XYZ; > %let quest="ABC"; > %let level=2; %process (klm, &level, fmt.); > run; > > The result is fine. It looks good with topic being XYZ and question being > ABC > > but... > I don't need the question line. If my codes are as shown below, then the > topic is still XYZ which is what I want. But I don't need the quest. That's > why I remove the %let quest="ABC" but the output shows &quest > > %let topiclbl=XYZ; > %let quest= ; > %let level=2; %process (klm, &level, fmt.); > run; > > > How can I fix this problem? I do not need the quest line. Any help will be > appreciated. > Thank you, > Fay >

-- \\ - - // ( @ @ ) +------oOOo-(_)-oOOo----------+---------------------------------+

Amor Fati : “Love Your Fate”, which is in fact your life. ~ Friedrich Nietzsche


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