Date: Thu, 29 Jul 2004 14:08:12 -0600
Reply-To: Roberto Valdivia <valdivia@MONTANA.EDU>
Sender: "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From: Roberto Valdivia <valdivia@MONTANA.EDU>
Subject: Re: Several datasets, one program -It works
Content-Type: text/plain; charset="us-ascii"
Thanks for your macro. I used it and modified it a little bit, and now it
I can run the same program using several datasets in one run.
From: SAS(r) Discussion [mailto:SAS-L@LISTSERV.UGA.EDU] On Behalf Of Howard
Sent: Wednesday, July 28, 2004 3:25 PM
Subject: Re: Several datasets, one program
I would create one macro to run your program once, with the two parameters
(dataset number and the other one) as arguments. Then have a second macro
loop and invoke the first macro. Here's an example:
data demo1; retain v 1; run;
data demo2; retain v 2; run;
format v 6.&DPLACES;
%do i = 1 %to &TIMES;
On Wed, 28 Jul 2004 12:18:47 -0600, Roberto Valdivia <valdivia@MONTANA.EDU>
>Maybe somebody has an idea on how to make this problem easier:
>I have a SAS program that uses 1 dataset (A.dbf) as input and I get one
>dataset as output (Z.dbf).
>I have 28 datasets "A" (a1..A28), which means that I have to run the
>But there is more: I also have to change a value in one parameter in
>which means that I actually have to run the program 56 times and get
>the final databases (ZA1_1, ZA1_2, ZA2_1, ZA2_2,...ZA28_1, ZA28_2).
>Is there any way (macro, program, etc?) that I can use so I can run a
>And it automatically changes/updates : a. The input database name b.
>the Output database name and c. the parameter value inside the program
>(The first two are the key,
>value cannot be changed but the input and output database names can,
>then I still will save a lot of time, I just will have to run again the
>program with the other parameter's value)
>I don't know how complicated or easy this is, but any help will be