Rational Developer for System z
Enterprise COBOL for z/OS, Version 4.1, Language Reference


File section

The file section must contain a level-indicator for each input and output file:

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. 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.

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.


Terms of use | Feedback

This information center is powered by Eclipse technology. (http://www.eclipse.org)