USING Phrase

file-name-2, ...
The input files.

When the USING phrase is specified, all the records in file-name-2, ... (that is, the input files) are transferred automatically to file-name-1. At the time the SORT statement is executed, these files must not be open; the compiler opens, reads, makes records available, and closes these files automatically. If EXCEPTION/ERROR procedures are specified for these files, the compiler makes the necessary linkage to these procedures. The input files must be sequential, relative or indexed files.

All input files must specify sequential or dynamic access mode, and must be described in FD entries in the Data Division.