data a2;
num=0;
do _n_=1 by 1 until(last._col0);
set a1;
by _col0;
num+1;
output;
end;
run;
proc sql;
select max(num) into : obs
from a2;
quit;
%macro aa();
data a3;
do i=1 by 1 until(last._col0);
set a1;
by _col0;
array m(*) m1-m%left(&obs.);
m(i)=rate3_change;
end;
drop i rate3_change;
run;
%mend;
%aa;