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

Table 67 Open Modes for Structured Disk Files Present at Run Time (continued)
ActionOpen Mode
The file position indicator is set to the first record in the file.
HP COBOL Queues Printer File Records
HP COBOL queues write operations to files that are associated with printers and to processes
that behave like printers. The LINAGE clause of the file description entry and the ADVANCING
phrase of the WRITE statement are valid only for such files.
Records that HP COBOL writes to a process are queued only when the OPEN statement
specifies an attribute of OUTPUT, EXTEND, or I-O, and at least one of these is true:
The file description entry includes a LINAGE clause
The OPEN statement discovers that the process with which it is associating the file has
the device subtype attribute value of 31
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 (page 304) 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:
Exclusion ModeDevice
SHAREDTerminal (including the operator console)
PROTECTEDDisk file being opened for input
EXCLUSIVEOther file
OPEN 387