Rational Developer for System z
Enterprise COBOL for z/OS, Version 4.1, Programming Guide


Updating records in a VSAM file

To update a VSAM file, use these PROCEDURE DIVISION statements.

Table 1. Statements to update records in a VSAM file
Access method ESDS KSDS RRDS
ACCESS IS SEQUENTIAL

OPEN EXTEND
WRITE
CLOSE

or

OPEN I-O
READ
REWRITE
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

OPEN I-O
READ
WRITE
REWRITE
DELETE
CLOSE

OPEN I-O
READ
WRITE
REWRITE
DELETE
CLOSE

ACCESS IS DYNAMIC (sequential processing) Not applicable

OPEN I-O
READ NEXT
WRITE
REWRITE
START
DELETE
CLOSE

OPEN I-O
READ NEXT
WRITE
REWRITE
START
DELETE
CLOSE

ACCESS IS DYNAMIC (random processing) Not applicable

OPEN I-O
READ
WRITE
REWRITE
DELETE
CLOSE

OPEN I-O
READ
WRITE
REWRITE
DELETE
CLOSE


Terms of use | Feedback

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