|
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
|