it is different from the 转置的方法与代码 in this website, actually my case is a little more complicated. anyway, any comments/suggestion is welcome,.
thanks again.
data have;
set sashelp.class; by age notsorted;
array t[&maxn, 2] %makevars(%eval(2*&maxn)*.);
n ++1;
t[n, 1] =height; t[n, 2] =weight;
if last.age then do;
output; call missing(of t[*] n);
end;
keep age %makevars;
run;[/code:cfkjdgrz]