|
It could be done in a single data step with a DOW loop. E.g.,
data want;
do until (last1);
set table end=last1;
sumsal=sum(sumsal,sal);
end;
do until (last2);
set table end=last2;
want=sal*100/sumsal;
output;
end;
run;
HTH,
Art
-------------
On Oct 31, 2:19 am, urbu...@yahoo.com (Bunti) wrote:
> All,
>
> I was wondering if below code can be done in data step
>
> proc sql;
> select *, (sal*100)/sum(sal) from table;
> quit;
>
> table is something like this
>
> name sal
> a 100
> b 200
> c 300
>
> Regards,=20
> Urvir=0A=0A=0A Keep up with people you care about with Yahoo! India Ma=
> il. Learn how.http://in.overview.mail.yahoo.com/connectmore
|