OPEN Statement - Format 3 - TRANSACTION

IBM Extension
IBM Extension
Read syntax diagramSkip visual syntax diagram
OPEN Statement - Format 3 - TRANSACTION

              .-------------.   
              V             |   
>>-OPEN--I-O----file-name-3-+----------------------------------><

The OPEN statement can cause a program device to be implicitly acquired for a TRANSACTION file. For a further discussion about the acquiring of program devices, see the ACQUIRE Statement.

End of IBM Extension
End of IBM Extension
INPUT
Permits opening the file for input operations.

Not allowed for FORMATFILE or printer files.

OUTPUT
Permits opening the file for output operations. This phrase will cause sequential and relative DISK files to be dynamically created if they do not exist and CRTF option is specified. When a file is opened OUTPUT it contains no records.

Existing records are removed (cleared) only for physical files. For logical files, the file is treated as though EXTEND had been specified.

I-O
Permits opening the file for both input and output operations. The I-O phrase can be specified only for files assigned to direct access devices, such as DISK, DATABASE, and workstation files.
EXTEND
Permits opening the file for output operations.

The EXTEND phrase must not be specified for a multiple file reel.

The EXTEND phrase is not allowed for:
  • FORMATFILE files
  • Printer files
  • DISKETTE files
file-name-1, file-name-2, file-name-3, file-name-4
Designates a file upon which the OPEN statement is to operate. If more than one file is specified, the files need not have the same organization or access. Each file-name must be defined in an FD entry in the Data Division, and must not name a sort or merge file. The FD entry must be equivalent to the information supplied when the file was defined.
REVERSED
Valid only for sequential single reel tape files.
NO REWIND
Valid only for sequential single reel tape files.