This phrase specifies the name of a procedure that is to select or modify output records from the merge operation.
The OUTPUT PROCEDURE can consist of any procedure needed to select, modify, or copy the records that are made available one at a time by the RETURN statement in merged order from the file referenced by file-name-1. The range includes all statements that are executed as the result of a transfer of control by CALL, EXIT, GO TO, and PERFORM statements in the range of the output procedure. The range also includes all statements in declarative procedures that are executed as a result of the execution of statements in the range of the output procedure. The range of the output procedure must not cause the execution of any MERGE, RELEASE, or SORT statement.
If an output procedure is specified, control passes to it after the file referenced by file-name-1 has been sequenced by the MERGE statement.
(C) Copyright IBM Corporation 1992, 2006. All Rights Reserved.