The table below shows the statements that you can use in the PROCEDURE DIVISION for sequential, line-sequential, indexed, and relative files.
| Access method | Sequential | Line sequential | Indexed | Relative |
|---|---|---|---|---|
| ACCESS IS SEQUENTIAL | OPEN EXTEND |
OPEN EXTEND |
OPEN EXTEND |
OPEN EXTEND |
| ACCESS IS RANDOM | Not applicable | Not applicable | OPEN I-O |
OPEN I-O |
| ACCESS IS DYNAMIC (sequential processing) | Not applicable | Not applicable | OPEN I-O |
OPEN I-O |
| ACCESS IS DYNAMIC (random processing) | Not applicable | Not applicable | OPEN I-O |
OPEN I-O |
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