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


Input-Output section

The input-output section of the environment division contains two paragraphs:

The exact contents of the input-output section depend on the file organization and access methods used. See ORGANIZATION clause and ACCESS MODE clause.

Program input-output section
The same rules apply to program and method I-O sections.
Class input-output section
The input-output section is not valid for class definitions.
Method input-output section
The same rules apply to program and method I-O sections.
Read syntax diagramSkip visual syntax diagram
Format: input-output section

>>-INPUT-OUTPUT SECTION.--FILE-CONTROL.------------------------->

   .------------------------.   
   V                        |   
>----file-control-paragraph-+----------------------------------->

>--+------------------------------------------------+----------><
   '-I-O-CONTROL.--+------------------------------+-'   
                   | .-----------------------.    |     
                   | V                       |    |     
                   '---i-o-control-paragraph-+--.-'     

FILE-CONTROL
The keyword FILE-CONTROL identifies the file-control paragraph. This keyword can appear only once, at the beginning of the FILE-CONTROL paragraph. It must begin in Area A and be followed by a separator period.

The keyword FILE-CONTROL and the period can be omitted if no file-control-paragraph is specified and there are no files defined in the program.

file-control-paragraph
Names the files and associates them with the external data sets.

Must begin in Area B with a SELECT clause. It must end with a separator period. See FILE-CONTROL paragraph.

file-control-paragraph can be omitted if there are no files defined in the program, even if the FILE-CONTROL keyword is specified.

I-O-CONTROL
The keyword I-O-CONTROL identifies the I-O-CONTROL paragraph.
i-o-control-paragraph
Specifies information needed for efficient transmission of data between the external data set and the COBOL program. The series of entries must end with a separator period. See I-O-CONTROL paragraph.

Terms of use | Feedback

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