@ashish112 wrote: I want to sum of only positive numbers then how to do it? for example I have 200 odd variables columns and values like a b c .... n 1 -2 1... 2 2 2 -4... -1 and I want only positive sum of variables like a b c .... n PositiveSum 1 -2 1... 2 4 2 1 -4... -1 3 data test; infile cards; input A1 A2 A3 A4 A5; cards; -2 2 5 1 0 1 -2 5 1 2 ; run; proc print; data sums; set test; array n(*) A:; do i=1 to dim(n); if n[i]<0 then n[i]=0; sum=sum(of n(*)); end; run; proc print; run;
... View more