Multiple choice technology mainframe

Which one of the following is true about merge verb?

  1. KEY data items can contain an OCCURS clause.

  2. Files must be explicitly opened before using the Merge verb.

  3. OUTPUT PROCEDURE can contain any SORT or MERGE statements.

  4. INPUT PROCEDURE is not present in Merge verb.

Reveal answer Fill a bubble to check yourself
D Correct answer
Explanation

In COBOL, the MERGE verb combines multiple pre-sorted input files into a single sorted output file. Unlike the SORT verb, MERGE does not support INPUT PROCEDURE because the input files must already be sorted - MERGE only merges existing sorted files. OUTPUT PROCEDURE is supported to process the merged output. Option A is incorrect because KEY data items with OCCURS clause are not allowed. Option B is incorrect because MERGE implicitly opens files. Option C is incorrect because OUTPUT PROCEDURE cannot contain SORT or MERGE statements.