I have data sets like
AD_11 AD_12 ........AD_110
AD_21 AD_22.........AD_210
................................................
AD_111 AD_112.........AD_1110
Each data sets have single observation
Now I want merge data sets AD_11 AD_12 AD_13 ..... AD_110 into data set AAD_1
similarly AD_21 AD_22 AD_23..... AD_210 into data set AAD_2
For this purspose I m using following sas program
data _null_;
do j=1 to 11;
call execute(cats('data AAD_',put(j,8.),';'));
do i = 1 to 10;
sk=catt(j,i);
skn=inputn(sk,'6.',6,0);
call execute(cats ('set AD_',put(skn,8.),'; rename COL1=A;' ));
end;
end; run;
But when I run this program then for inner do loop ( i) it reads 10 obs from 10 data sets AD_11 to AD_110 but save only single value to AAD_1, however it should save all ten observation to AAD_1