The field starting from 21st position till 40th position has to be treated like a numeric field and I have to add all these rows value for this position to find out the sum total in cobol. But cobol does not support numeric of more than 18 size. Can any one please help me to find out how to do that?
Joined: 22 Apr 2006 Posts: 6258 Location: Mumbai, India
or if you are restricted to an old compiler where the ARITH(EXTEND) option was not yet available, you could split the 20-digit numbers into "left" and "right" halves, add the right halves together, carry (if necessary) to the left halves, add the left halves, then concatenate the halves back together into your 20-digit number and then since you are limited to 18 digits, you'd need to define that 20-digit number as alphanumeric.