Your Browser is not longer supported

Please use Google Chrome, Mozilla Firefox or Microsoft Edge to view the page correctly
Loading...

{{viewport.spaceProperty.prod}}

OPEN - Open file

&pagelevel(4)&pagelevel

The OPEN statement permits an open file or volume to be closed and another one to be opened. Only systems support is authorized to open a volume.

Format

OPEN / O                                                                                                 

{ filename

[,INOUT / ,INPUT/ ,PHYSICAL] /

'vsn'

[,[device-type] [EXCLUSIVE / ,SHAREABLE]] }

Operands

Opening a file

filename
Fully qualified file name or name of a file generation group. The file protection offered by DMS takes effect when the file is opened (e.g. password, external access, read/write access).

INOUT
The file is opened for reading and writing.

INPUT
The file is opened for reading only. WRITE statements lead to a PAM write error.

PHYSICAL
The file is opened for reading only. WRITE statements lead to a PAM write error. If the file is encrypted, the subsequent output statements result in the file content being output in encrypted format.

Opening a volume

'vsn'
The volume serial number, up to six characters long, of a volume (either public or private) is enclosed in single quotes.

device-type
Defines the volume device type.
See the “System Installation” manual [7 (Related publications)] for possible specifications.

EXCLUSIVE
The volume is opened exclusively for one task.

SHAREABLE
The volume is opened as a public volume.

Example

OPEN 'ABCDEF'

Volume 'ABCDEF' is opened exclusively if it is available.