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


PROCEDURE DIVISION statements used to update files

The table below shows the statements that you can use in the PROCEDURE DIVISION for sequential, line-sequential, indexed, and relative files.

Table 16. PROCEDURE DIVISION statements used to update files
Access method Sequential Line sequential Indexed Relative
ACCESS IS SEQUENTIAL OPEN EXTEND
WRITE
CLOSE
 
 
or
 
 
OPEN I-O
READ
REWRITE
CLOSE
OPEN EXTEND
WRITE
CLOSE
OPEN EXTEND
WRITE
CLOSE
 
 
or
 
 
OPEN I-O
READ
REWRITE
DELETE
CLOSE
OPEN EXTEND
WRITE
CLOSE
 
 
or
 
 
OPEN I-O
READ
REWRITE
DELETE
CLOSE
ACCESS IS RANDOM Not applicable Not applicable OPEN I-O
READ
WRITE
REWRITE
DELETE
CLOSE
OPEN I-O
READ
WRITE
REWRITE
DELETE
CLOSE
ACCESS IS DYNAMIC (sequential processing) Not applicable Not applicable OPEN I-O
READ NEXT
READ PREVIOUS
START
CLOSE
OPEN I-O
READ NEXT
READ PREVIOUS
START
CLOSE
ACCESS IS DYNAMIC (random processing) Not applicable Not applicable OPEN I-O
READ
WRITE
REWRITE
DELETE
CLOSE
OPEN I-O
READ
WRITE
REWRITE
DELETE
CLOSE

related concepts
File organization and access mode

related tasks
Opening a file
Reading records from a file
Adding records to a file
Replacing records in a file
Deleting records from a file

related references
Statements used when writing records to a file


Terms of use | Feedback

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