Date: Fri, 17 Dec 2004 09:04:41 -0500
Reply-To: "Fehd, Ronald J." <RJF2@CDC.GOV>
Sender: "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From: "Fehd, Ronald J." <RJF2@CDC.GOV>
Subject: Re: to iterate a macro
Content-Type: text/plain; charset="us-ascii"
> From: Mayukh Dass
> I have a macro %iterate. with no return value. How do I execute this
> macro 100 times?
>
> I tried something like:
>
> data one;
> do i=1 to 100;
> %iterate;
> end;
> run;
>
> but its giving an error saying that a do loop is open.
%Macro doloop(dim=);
%Local I;
%Do I = 1 %to &Dim.;%iterate(N=&I.)%end;%mend;
%DoLoop(dim = 10);
uh, why wou you want to run a macro procedure
that has no parameters and no return value?
Ron Fehd the macro maven CDC Atlanta GA USA RJF2 at cdc dot gov
Efficiency is intelligent laziness. -David Dunham
... not to be confused
with intelligent misuse of (computing) power
|