FILE-CONTROL paragraph
The FILE-CONTROL paragraph associates each file in the COBOL program with an external file, 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 table below lists the different type of files available to programs.
File organization | File system |
---|---|
Sequential | SFS, STL, RSD1, Db2®, QSAM2, MONGO |
Relative | SFS, STL, Db2, MONGO |
Indexed | SFS, STL, Db2, MONGO |
Line sequential | LSQ |
|
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.
The underscore is allowed in the external-file-name component of assignment-name-1.
Restriction: record-key-name is
supported for STL file system only.