Function
The FILE-CONTROL paragraph is used to give each file a name. The files are assigned to one or more external devices, and the information required for file processing is made available. This information indicates how the data is organized and how it is to be accessed.
Format 1 File control entries for sequential file organization
FILE-CONTROL.
SELECT clause
ASSIGN clause
[ORGANIZATION clause]
[PADDING CHARACTER clause]
[RECORD DELIMITER clause]
[ACCESS MODE clause]
[RESERVE clause]
[FILE STATUS clause].
Format 2 File control entries for relative file organization
FILE-CONTROL.
SELECT clause
ASSIGN clause
[ACCESS MODE clause]
[FILE STATUS clause]
ORGANIZATION clause
[RESERVE clause].
Format 3 File control entries for indexed file organization
FILE-CONTROL.
SELECT clause
ASSIGN clause
[ACCESS MODE clause]
[ALTERNATE RECORD KEY clause]
[FILE STATUS clause]
ORGANIZATION clause
RECORD KEY clause
[RESERVE clause].
Syntax rule
The SELECT clause must be the first file control entry. All other clauses may appear in any order.
If the GLOBAL clause is specified in the file description entry, the data items referenced in the clauses of the FILE-CONTROL paragraph may not be defined in a LOCAL-STORAGE SECTION.
Only the SELECT and ASSIGN clauses may be specified for sort files.
In the pages that follow, the SELECT and ASSIGN clauses are described first, followed by the remaining clauses in alphabetical order.