I want to sum up the numeric fields for TESTCUSPn (col 129,length 9) . The first numeric field starts in col 144 and length is 15 (including trailing sign). The second field starts in col 166 and length is 21 (including trailing sign).
As you can see the numeric fields includes commas and leading spaces. Please let me know how to sort this in order to obtain the output below. We have SYNCSORT FOR Z/OS 2.1.8.
Input
Command ===>
-3----+----4----+----5----+----6----+----7----+----8----+-
TESTCUSP1 660- 66,363.00-
TESTCUSP2 30,000- 37,959.17-
TESTCUSP2 30,000 37,963.33
TESTCUSP3 50,000- 51,534.72-
-3----+----4----+----5----+----6----+----7----+----8----+-
TESTCUSP1 660- 66,363.00-
TESTCUSP2 30,000- 37,959.17-
TESTCUSP2 30,000 37,963.33
TESTCUSP3 50,000- 51,534.72-
Expected Output
Command ===>
-3----+----4----+----5----+----6----+----7----+----8----+-
TESTCUSP1 660- 66,363.00-
TESTCUSP2 0 4.16
TESTCUSP3 50,000- 51,534.72-
-3----+----4----+----5----+----6----+----7----+----8----+-
TESTCUSP1 660- 66,363.00-
TESTCUSP2 0 4.16
TESTCUSP3 50,000- 51,534.72-
coded, to show the proper spacing,
please do it Yourself, the next time
the input was already clobbered
if You apply the code tags when submitting a post
the spacing will still be good
use the preview button to verify