>dcl sum fixed (7) init (-0.1); /* Packed Decimal? */
>for i = 1 to whatever; > if a(i) >= 0 then > sum = sum + a(i); > And there, at least I'd do: > if a(i) > 0 then > sum = sum + a(i); > as long as testing, why bother to add 0? >if substr(unspec(sum), 25, 8) ^= '0d'bx then /* test the sign of the number? */ > put data(sum); > Unspec function returns a binary representation Sincerely; Kenneth J. Kripke kennethkri...@gmail.com ---------------------------------------------------------------------- For IBM-MAIN subscribe / signoff / archive access instructions, send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN