[code:5ad76]data tem2;
do i=1 to 20;
A=int(ranuni(12345)*10);
output;
end;
run;
data tem2;
if _n_=1 then do until(last);
set tem2(keep=a) end=last;
Sum_a+a;
end;
set tem2;
Percent=A/Sum_a;
format percent percent10.2;
run;[/code:5ad76]