Previous Topic

Next Topic

Book Contents

Book Index

MERGEX

The MERGEX reconciliation function sorts the files involved in the reconciliation process, merges them into one output work file, and produces the unmatched records as output.

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

The input file for the MERGEX function must be referenced by the SORTIN DD statement. The MERGEX output work file must be referenced by the SRTOUT DD statement.

The output of the MERGEX function is a file containing only unmatched records. The output is referenced by the SRECOUT1 DD statement that 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 MERGEX output and prints a message for each unmatched record.

Parent Topic

Reconciliation Functions