Sort-Merge COBOL

The sort-merge feature provides the capability to order one or more files of records, or to combine two or more identically ordered files of records, according to a set of user-specified keys contained within each record. Optionally, a user may apply some special processing to each of the individual records by input or output procedures. This special processing may be applied before, after, or both before and after the records are ordered by the SORT, or after the records have been combined by the MERGE.

Sort-merge provides the facility for sorting one or more files, or combining two or more files, one or more times within a given execution of a program.

The files listed in the USING and GIVING phrases of the SORT and MERGE statements may be of any organization.

No input-output statement may be executed for the file named in the sort-merge file description.

All rights reserved © 2018 Wisdom IT Services India Pvt. Ltd Protection Status

COBOL Topics