The file section must contain a level-indicator for each input and output file:
One or more record description entries must follow file-name. When more than one record description entry is specified, each entry implies a redefinition of the same storage area.
The clauses that follow file-name are optional, and they can appear in any order.
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.
All the record description entries under the file description entry (FD) for an RSD file must be described with the same number of bytes. The following example illustrates the file section for an RSD file with level 01 records that are of a fixed length:
FILE SECTION.
FD an-RSD-file . . . RECORD CONTAINS 80 CHARACTERS.
01 record-1 PIC X(80).
01 record-2.
02 PIC X(10).
02 PIC X(70).