FILE-CONTROL paragraph
The FILE-CONTROL paragraph associates each file in the COBOL program with an external data set, and specifies file organization, access mode, and other information.
The following formats are for the FILE-CONTROL paragraph:
- Sequential file entries
- Indexed file entries
- Relative file entries
- Line-sequential file entries
The following table lists the different type of files available to programs and methods.
File organization | Access method |
---|---|
Sequential | QSAM, VSAM1 |
Relative | VSAM1 |
Indexed | VSAM1 |
Line sequential2 | Text stream I-O |
|
The FILE-CONTROL paragraph begins with the word FILE-CONTROL followed by a separator period. It must contain one and only one entry for each file described in an FD or SD entry in the DATA DIVISION.
Within each entry, the SELECT clause must appear first. The other clauses can appear in any order, except that the PASSWORD clause for indexed files, if specified, must immediately follow the RECORD KEY or ALTERNATE RECORD KEY data-name with which it is associated.
The name component of assignment-name-1 cannot contain an underscore.