Rational Developer for System z
COBOL for Windows, Version 7.5, Programming Guide


Valid COBOL statements for indexed and relative files

The following table shows the possible combinations of input-output statements for indexed and relative files. 'X' indicates that the statement can be used with the open mode shown at the top of the column.

Table 14. Valid COBOL statements for indexed and relative files
Access mode COBOL statement OPEN INPUT OPEN OUTPUT OPEN I-O OPEN EXTEND
Sequential OPEN X X X X
WRITE   X   X
START X   X  
READ X   X  
REWRITE     X  
DELETE     X  
CLOSE X X X X
Random OPEN X X X  
WRITE   X X  
START        
READ X   X  
REWRITE     X  
DELETE     X  
CLOSE X X X  
Dynamic OPEN X X X  
WRITE   X X  
START X   X  
READ X   X  
REWRITE     X  
DELETE     X  
CLOSE X X X  

related concepts
Indexed file organization
Relative file organization
Sequential access
Random access
Dynamic access


Terms of use | Feedback

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