Date: Tue, 21 Mar 2006 13:28:04 -0500
Reply-To: Gerhard Hellriegel <ghellrieg@T-ONLINE.DE>
Sender: "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From: Gerhard Hellriegel <ghellrieg@T-ONLINE.DE>
Subject: Re: Macro - Plz Help
Yes, but that is senseless. FIRST.xxx and LAST.xxx are logical (numeric in
SAS) indicators for a by-group to begin or to end, means, that makes only
sense where you deal with observations (records). Macros are not dealing
with obs, but are creating text
...
%let a=1;
%macro x;
%if &a=1 %then %do;
proc aisequalone; run;
%end;
%else %do;
proc aisnotequalone; run;
%end;
%mend;
options mprint;
%x;
creates the text
proc aisequalone; run;
Maybe you will receive several error messages, but not from the macro! Have
a look into the MPRINT section and you'll see, that the macro does what you
told it: creating some text.
On Tue, 21 Mar 2006 12:45:36 -0500, SUBSCRIBE SAS-L Anonymous
<sas_use@YAHOO.COM> wrote:
>Hello,
>Can we use first. and last. within a macro.
>If yes, how???
>
>Thank you all in advance.
|