Page 1 of 1

Problem while adding large values in REXX

PostPosted: Fri Apr 29, 2011 12:28 pm
by Mann_B
Hi ..

I have a requirement where I need to add amount fileds at Card Member level. If I have same CM twice then I need to sum up the amount from 2 records and I need to have single record in the o/p for that CM,
Even if they are negative I need to add those.
Amount field is of 8bytes --s9(15) comp-3
We are unpacking the values ,adding them and appending C for positive and D for negative and packing the value again.
Now am encountering a prob while adding a number.

AMOUNT1= -1299999870 --it is Negative
As it is large number its been replaced by 1.29999987E+9.

AMOUNT2= -200000130

After adding it is = -1.50000000E+9
After appending D as it is negative value is it 001.50000000E+9D

So after adding ,the frmt is stil the same and am getting error while packing that value again.
AMOUNT.CNT = (X2C(AMOUNT.CNT))
Please help me like how to get the actual value for it,,

Thank You

Re: Problem while adding large values in REXX

PostPosted: Fri Apr 29, 2011 12:32 pm
by enrico-sorichetti
NUMERIC DIGITS

Re: Problem while adding large values in REXX

PostPosted: Sat Apr 30, 2011 11:49 am
by Mann_B
Hi enrico-sorichetti

Thank You soo much..I got the required results.