The following table shows the COBOL statements that you can use when creating or extending a file.
| Division | Sequential | Line sequential | Indexed | Relative |
|---|---|---|---|---|
| ENVIRONMENT | SELECT | |||
| ASSIGN | ||||
| ORGANIZATION IS SEQUENTIAL | ORGANIZATION IS LINE SEQUENTIAL | ORGANIZATION IS INDEXED | ORGANIZATION IS RELATIVE | |
| n/a | RECORD KEY | RELATIVE KEY | ||
| ALTERNATE RECORD KEY | ||||
| FILE STATUS | ||||
| ACCESS MODE | ||||
| DATA | FD entry | |||
| PROCEDURE | OPEN OUTPUT | |||
| OPEN EXTEND | ||||
| WRITE | ||||
| CLOSE | ||||
related concepts
File organization and access mode
related tasks
Specifying a file organization and access mode
Opening a file
Setting up a field for file status
Adding records to a file
related references
PROCEDURE DIVISION statements used to update files