Hi All,
I have a report file as a input where the amount field has been defined as numeric edited field in the format given below.
I want to read that amount for every record from the input file and do summation.
The picture clause defined for amount field is --------------9.99
I have redefined this field using the below format.
01 Ws-original-amt pic --------------9.99.
01 Ws-field REDEFINES Ws-original-amt.
05 ws-first-value pic S9(15).
05 filler pic x.
05 ws-last-value pic 99.
I am able to read the positive amount using redefine clause but having issues with reading the negative amount. The negative sign is considered as space and I am not able to identify the negative amount.
For example if I have the amount as -15.00 in the input report file then I can see the same amount in display before doing summation using the redefined field (ws-first-value) but the instead of reducing the total it gets increased by 15.
Please let me know if anybody have solution for this.
Regards,
Shrishant