Previous Topic

Next Topic

Book Contents

Book Index

SUMX

The SUMX reconciliation function does the following:

  1. It sorts the files involved in the reconciliation process.
  2. It sums identical key records in each file.
  3. It merges the summed records into one output work file.
  4. It produces an output file containing unmatched records.
  5. Optionally, it produces another output file containing matched records.

The Preparation stage must be performed using the WRITE function on both input files before the SUMX function can be performed. The SETKEY function cannot be run in preparation for the SUMX function.

The input file for the SUMX function must be referenced by the SORTIN DD statement. The output work file for summed records must be referenced by the SORTOUT DD statement.

The output of the SUMX function includes a file containing all unmatched records. This output file is referenced by the SRECOUT1 DD statement, which must be included in the job that invokes the reconciliation rule. For more information, see DD Statements.

An optional output file, referenced by the SRECOUT2 DD statement, includes all matched records from the original files. This optional output file is produced if parameter match is set to YES and the SRECOUT2 DD statement is included in the job that invokes the reconciliation rule.

The next block in the reconciliation rule is usually an ON DDNAME SRECOUT1 block that scans the SUMX output and prints an error message for each unmatched summary record.

Parent Topic

Reconciliation Functions