When the USING phrase is specified, all the records on file-name-2, file-name-3,… (that is, the input files) are transferred automatically to file-name-1. At the time the MERGE statement is executed, these files must not be open; the compiler generates code that opens, reads and closes the input files automatically. If EXCEPTION/ERROR procedures are specified for these files, the COBOL compiler makes the necessary linkage to these procedures.
All input files must be described in an FD entry in the Data Division, and their record descriptions must describe records of the same size as the record described for the merge file. If the elementary items that make up these records are not identical, input records must have an equal number of character positions as the merge record.
The input files must have sequential, relative or indexed organization.
If file-name-1 contains variable length records, the size of the records contained in the input files must be no less than the smallest record nor greater than the largest record described for file-name-1. If file-name-1 contains fixed-length records, the size of the records contained in the input files must be no greater than the largest record described for file-name-1.