COBOL Manual for TNS/E Programs (H06.03+)

Procedure Division Verbs
HP COBOL Manual for TNS/E Programs520347-003
9-142
OPEN
When the OPEN routine opens a printer-type file, it turns off automatic page
ejection, computes any dynamic logical page attributes, and when appropriate,
performs a page eject.
Files Assigned to Tape Devices
When the file device is a tape unit, the run-time routines request mounting of the
first, last, or only reel of the file:
°
The first or only reel if the open mode is INPUT or OUTPUT
°
The last or only reel if the open mode is EXTEND
See CLOSE in this section for more information about the messages that the run-
time routines issue about tape mounting.
If the NO REWIND phrase appears, the tape is presumed to be already properly
positioned; otherwise, the tape is rewound and, if it is a multiple-file tape,
positioned to the file being opened.
The NO REWIND phrase is ignored if the file device is not a tape unit. If the rest of
the open operation actions complete successfully, the I-O status code is set to “07.”
Process Pairs
When the process is executing as a process pair, each open operation for a file
also executes an implied statement of this form:
CHECKPOINT FILE file-name
Exclusion Modes
The EXCLUSIVE, SHARED, or PROTECTED phrase specifies the appropriate file
system exclusion mode for the file.
If the OPEN statement does not have one of these phrases, the process
determines the default exclusion mode: when a command interpreter ASSIGN
command that applies to the file specifies an exclusion mode, the process uses
that exclusion mode; otherwise, the process determines the exclusion mode from
the type of file device:
A file that no process has open can be opened by any single process with any
exclusion mode.
If some process already has a file open EXCLUSIVE, no other process can open
the file.
A file intended for multi-user access must specify SHARED.
Device Exclusion Mode
Terminal (including the operator console) SHARED
Disk file being opened for input PROTECTED
Other file EXCLUSIVE