Date: Sun, 30 Apr 2006 17:21:06 GMT
Reply-To: "C.L. Groves" <c_groves@JUNO.COM>
Sender: "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From: "C.L. Groves" <c_groves@JUNO.COM>
Subject: Re: How to automatically change data name in SET?
Content-Type: text/plain
might try this---
options symbolgen mlogic mprint;
%macro monthn(month);
%do i=1 %to 3;
month&i
%end;
%mend;
data month1;
input a b c;
datalines;
1 2 3
;
run;
data month2;
input d e f;
datalines;
4 5 6
;
run;
data month3;
input g h i ;
datalines;
7 8 9
;
run;
DATA RESULT;
set %monthn(3);
run;
proc print;
run;
"..faith is the assurance of things hoped for, the conviction of things not seen."------>For I know the plans I have for you,plans to prosper you and not to harm you, plans to give you hope and a future."---->Try again, fail again, fail better. - Samuel Becket
|