Date: Tue, 19 Mar 2002 10:58:25 +0200
Reply-To: arjen.raateland@vyh.fi
Sender: "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From: Arjen Raateland <arjen.raateland@VYH.FI>
Organization: Suomen ympäristökeskus
Subject: Re: macro
Content-Type: text/plain; charset=us-ascii
"Fehd, Ronald J." wrote:
> %macro GENLIST(MVAR,LO,HI);
> %global &MVAR.;
> %LET &MVAR.=;%*INITIALIZE TO NULL;
> %DO I= &LO. %TO &HI.;
> %LET &MVAR. = &MVAR. &I.;%*CONCATENATION;%END;
> %PUT &MVAR.<&&&MVAR.>;%MEND;
>
> %GENLIST(YRS89TO99,89,99);
> --> cheerful provider of UNTESTED SAS code from the Clue?Gee!Wrx <--
It works 'more better' with two &'s added:
%LET &MVAR. = &&&MVAR. &I.;%*CONCATENATION;%END;
--
Arjen Raateland
Finnish Environment Institute SYKE
SAS Support
phone +358 9 4030 0350
|