Date: Mon, 29 Jul 1996 07:31:16 -0700
Reply-To: Peter Lund <PeterL@OFM.WA.GOV>
Sender: "SAS(r) Discussion" <SAS-L@UGA.CC.UGA.EDU>
From: Peter Lund <PeterL@OFM.WA.GOV>
Organization: Office of Financial Management, State of Washington
Subject: Re: SAS Handling of Missing
This thread has gotten a little off track, but some erroneous statements are
being made.
Patricia Flickner wrote:
>Okay, guys, I have to put my two sense in. Dave is right about the run
>statement for using the SYMPUT ONLY if this was set up in a macro and
>you use the SYMPUT macrovariable you created in the macro, e.g.:
>%macro dummy;
> data _null_;
> set flip.side;
> call symput('i',over);
> run;
> %do x = 1 %to &over;
> .
> .
> .
>%mend dummy;
A run statement is necessary anytime that macro variable can be resolved
before a step boundary, i.e. another data/proc or a run. For example, the
following title displays "This is a test". Assuming you wanted the value
given to &macvar in the datastep to show up in the title, you need a RUN
statement on that datastep.
%let macvar = a test;
data temp;
x = 'no test';
call symput('macvar',x);
title "this is &macvar";
proc print;
run;
Pete Lund
WA State Office of Financial Management
peterl@ofm.wa.gov
|