FILE SECTION

The FILE SECTION must contain a level-indicator for each input and output file. For all files except sort or merge files, the FILE SECTION must contain an FD entry. For each sort or merge file, the FILE SECTION must contain an SD entry.

file-name
Must follow the level indicator (FD or SD), and must be the same as that specified in the associated SELECT clause. file-name must adhere to the rules of formation for a user-defined word; at least one character must be alphabetic. file-name must be unique within this program.

One or more record description entries must follow file-name. A record description entry may describe a type-name. Each entry, which is not a type-name, implies a redefinition of the same storage area.

The clauses that follow file-name are optional, and they can appear in any order.

FD (formats 1, 2, and 3)
The last clause in the FD entry must be immediately followed by a separator period.
SD (format 4)
An SD entry must be written for each sort or merge file in the program. The last clause in the SD entry must be immediately followed by a separator period.

The following example illustrates the FILE SECTION entries needed for a sort or merge file:


SD  SORT-FILE.
01  SORT-RECORD  PICTURE X(80).

A record in the FILE SECTION must be described as an alphanumeric group item, a national group item, or an elementary item of class alphabetic, alphanumeric, DBCS, national, or numeric.