Date: Mon, 12 Sep 2005 12:35:55 -0700
Reply-To: David L Cassell <davidlcassell@MSN.COM>
Sender: "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From: David L Cassell <davidlcassell@MSN.COM>
Subject: Re: running macro in SAS 9.0
Content-Type: text/plain; format=flowed
>I am trying to run the following macro in SAS 9.1.3
>%if lot eq &a %then %do;
>%do i=3D1 %to 145;
>The output is coming as:
>258 %macro john(a=3D);
>259 data temp;
>260 set test1;
>261 %if lot eq &a %then %do;
>266 data test1;
>267 set temp;
>269 %mend john;
>271 %macro john1;
>272 data two;
>273 %do i=3D1 %to 145;
>277 %mend john1;
>And its not doing anything its suppose to do.
Perhaps if you wrote back to SAS-L and explained what you're actually trying
to do, someone on the list could help you. As it is, I'm just not sure what
want to do with your data. It looks like you're trying to call a data step.
145 times. Inside another data step, which is - as you know - illegal.
What did your log say, and what macro options were you using so that you
could see the flow of your macro logic?
Have you tried to write this problem out with no macro code whatsoever?
If so, what problems did you run into?
>Any suggestions will be appreciated.
Having just read my suggestions, you'd probably like to retract that.
David L. Cassell
3115 NW Norwood Pl.
Corvallis OR 97330
Donít just search. Find. Check out the new MSN Search!