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 libname&yymm0..dataset&yymm0. where a=1 union
select var1, var3 from libname&yymm1..dataset&yymm1. where a=1 union
select var1, var3 from libname&yymm2..dataset&yymm2. where a=1 union
select var1, var3 from libname&yymm3..dataset&yymm3. where a=1 union
select var1, var3 from libname&yymm4..dataset&yymm4. where a=1
quit;
run;
how can i do that for 0-1000?