Basically I am trying to sum a field where the values are -ve. On the output record I get a value of -21.7943 however the value i should get is -2179.4300.
Joined: 15 Feb 2005 Posts: 7129 Location: San Jose, CA
Since you haven't said exactly what your input fields look like, it's difficult to help you. But as a guess, I'd say it looks like you need to multiple the -ve value by +100 to get the result you want. Perhaps replacing your INREC statement and the TOT operand with the following will do it:
If that doesn't help, please show an example of the records in your input file (relevant fields only) for the + and - cases, and what you expect for output. Give the RECFM and LRECL of the input file. Give the starting position, length and format of each relevant field.