Rational Developer for System z
COBOL for Windows, Version 7.5, 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.

Format: Programs and methods
Read syntax diagramSkip visual syntax diagram>>-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

Copyright IBM Corporation 1996, 2008.
This information center is powered by Eclipse technology. (http://www.eclipse.org)