OPEN

[label] OPEN (address[,INPUT|OUTPUT|UPDAT|EXTEND],...)

[,MODE=24|31]

Parameters

address
Address of an ACB or DCB associated with the file to be activated.
INPUT|OUTPUT |UPDAT|EXTEND
These options are specified for QSAM and BSAM files only and indicate the type of processing to be enabled for the opened file. Option UPDAT is not available for BSAM files. Options specified for VSAM files are ignored.
MODE=24|31
For QSAM and BSAM files, specifies whether the program is running in 24-bit or 31-bit mode. No effect for VSAM files.

Comments

Opens a QSAM, BSAM or VSAM file or files for file handling.

List and execute forms are also available.

If the VSECOMP compiler directive is specified, Enterprise Developer Assembler support includes emulating the DOS/VSE version of this macro. In this case the expanded code is larger than that produced on the mainframe and may cause NO BASE REGISTER error messages. The unusual DOS/VSE register conventions for register 1 are also supported so syntax of the form OPEN (1) is accepted. However, the multiple operand syntax of the DOS/VSE OPEN macro is not supported, so use the MVS syntax instead.

The DOS/VSE-specific macro OPENR (Open a File Relocatable) is simply mapped to the standard OPEN macro. Self-relocating code is not generated as it would be under the DOS/VSE environment so modules using OPENR cannot be relocated at execution time by simply copying the generated machine code from one address to another.

Example

OPEN (INDCB,(OUTPUT))

OPEN ((2))