i would like to join the dataset like the following by using do loop inside the proc sql: i have macro variables yymm0-yymm4; yymm0=1505; yymm11=1501.
this is the code without do-loop:
proc sql;
create table output as
select var1, var3 from data1 where a=1 union
select var1, var3 from data2 where a=1 union
select var1, var3 from data3 where a=1 union
select var1, var3 from data4 where a=1
quit;
run;
How can i do it if i got 12 datasets which name of the datasets are data1-data12?