COBOL Manual for TNS and TNS/R Programs
Procedure Division Verbs
HP COBOL Manual for TNS and TNS/R Programs—522555-006
9-154
OPEN
•
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.
In the non-CRE environment (as opposed to the CRE), when a write operation for
a printer-type file releases a record to the run-time routines, the routines hold the
record until either another record is released or the file is closed. This enables the
run-time routines to consolidate any control operations (like page eject or spacing)
that follow one record with any that precede the next record, thereby reducing the
number of calls to the operating environment.
•
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