//SUMREC01 JOB SUMREC0J
//SUMEXEC EXEC PGM=SORT
//SORTIN DD *
CA-02963
CA 06288
CA 07351
CA 05027
CA 05200
//SORTOUT DD SYSOUT=*
//SYSOUT DD SYSOUT=*
//SYSIN DD *
SORT FIELDS=(1,2,CH,A)
SUM FIELDS=(3,6,ZD)
/*
When I submit the above job I got "CA026829" Which is the wrong answer.What I have to do for the JCL to consider the minus sign as well and get answer "CA023866"
You can convert the SFF field to ZD to sum the data as follows:
Will result in your output file containing:
Verified with AHLSORT for Windows x64, Version v14r3-87-g811342a2
Should work the same for DFSORT and SYNCSORT.