The above JCL provided is an example of SortXsum.
The Iput file is sorted on the bytes 1----7 and the i/p rec is wriitten into the o/p file denoted by SORTOUT.
In SYSIN it is mentioned SUM FIELDS=NONE,XSUM,
1) None :- indicates there should be no duplicate in the O/p
2) XSUM :- indicates the duplicate record should be mentioned in the file corresponding to SORTXSUM ddname;
Hence if 1----7 characters is name field and if the name is repeated twice in the i/p file the first rec after sorting will be put in the o/p file and the second rec goes to Xsum file.
Do inform me if any further information is required....
In the example given (JCL), is there a way to OMIT or SKIPREC some records from being processed in the XSUM?
Example:
Input file contains both Issue and cancel records.
(I)ssue records may be duplicated.
(C)ancel records that are duplicated cause an abend (long story).
I need to be able to exclude the Issue records from being sorted "out".
//SYSIN DD *
SORT FIELDS=(2,28,CH,A,1,1,CH,D),EQUALS
SUM FIELDS=NONE,XSUM