Rational Developer for System z
COBOL for Windows, Version 7.5, Language Reference


I-O-CONTROL paragraph

The I-O-CONTROL paragraph of the input-output section specifies when checkpoints are to be taken and the storage areas to be shared by different files. This paragraph is optional in a COBOL program.

The keyword I-O-CONTROL can appear only once, at the beginning of the paragraph. The word I-O-CONTROL must begin in Area A and must be followed by a separator period.

The order in which I-O-CONTROL paragraph clauses are written is not significant. The I-O-CONTROL paragraph ends with a separator period.

Format: Sequential I-O-control entries
Read syntax diagramSkip visual syntax diagram>>-+-RERUN--+----+--+-assignment-name-1-+--+-------+--| phrase 1 |------------------------+-><
   |        '-ON-'  '-file-name-1-------'  '-EVERY-'                                      |  
   +-SAME--+--------+--+------+--+-----+--file-name-3--+-----------------+----------------+  
   |       '-RECORD-'  '-AREA-'  '-FOR-'               | .-------------. |                |  
   |                                                   | V             | |                |  
   |                                                   '---file-name-4-+-'                |  
   |                                             .--------------------------------------. |  
   |               (1)                           V                                      | |  
   +-MULTIPLE FILE-------+------+--+----------+----file-name-5--+---------------------+-+-+  
   |                     '-TAPE-'  '-CONTAINS-'                 '-POSITION--integer-2-'   |  
   |                                .-------------.                                       |  
   |                  (1)           V             |                                       |  
   '-APPLY WRITE-ONLY-------+----+----file-name-2-+---------------------------------------'  
                            '-ON-'                                                           
 
phrase 1:
 
|--+-integer-1--RECORDS----+--+----+--file-name-1---------------|
   '-END--+----+--+-REEL-+-'  '-OF-'               
          '-OF-'  '-UNIT-'                         
 

Notes:
  1. The MULTIPLE FILE clause and APPLY WRITE-ONLY clause are syntax checked, but have no effect on the execution of the program.

Format: Relative and indexed I-O-control entries
Read syntax diagramSkip visual syntax diagram>>-+-RERUN--+----+--+-assignment-name-1-+--+-------+--| phrase 1 |---------+-><
   |        '-ON-'  '-file-name-1-------'  '-EVERY-'                       |  
   '-SAME--+--------+--+------+--+-----+--file-name-3--+-----------------+-'  
           '-RECORD-'  '-AREA-'  '-FOR-'               | .-------------. |    
                                                       | V             | |    
                                                       '---file-name-4-+-'    
 
phrase 1:
 
|--integer-1--RECORDS--+----+--file-name-1----------------------|
                       '-OF-'               
 

Format: Line-sequential I-O-control entries
Read syntax diagramSkip visual syntax diagram                                                       .-------------.    
                                                       V             |    
>>---SAME--+--------+--+------+--+-----+--file-name-3----file-name-4-+---><
           '-RECORD-'  '-AREA-'  '-FOR-'                                  
 

Format: Sort/merge I-O-control entries
Read syntax diagramSkip visual syntax diagram>>-+----------------------------------+------------------------->
   '-RERUN--+----+--assignment-name-1-'  
            '-ON-'                       
 
   .-------------------------------------------------------.  
   V                                                       |  
>----SAME--+-RECORD-----+--+------+--+-----+--| phrase 1 |-+---><
           +-SORT-------+  '-AREA-'  '-FOR-'                  
           '-SORT-MERGE-'                                     
 
phrase 1:
 
|--file-name-3--+---------------------+-------------------------|
                | .-----------------. |  
                | V                 | |  
                '---+-------------+-+-'  
                    '-file-name-4-'      
 

Terms of use | Feedback

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