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

Unlabeled Tapes
Without labels, the operating environment cannot use automatic volume recognition to locate the
tape, so the mount message from the HP COBOL run-time routine specifies the tape drive on which
to mount the tape—the tape drive specified by the DEVICE attribute of the file’s DEFINE.
If the mount message appears on a terminal display, you can specify a different tape drive on
which to mount the tape. Respond to the mount message by typing the device name of the new
tape drive after the colon:
TYPE RETURN OR $DEVICE (OR 'NO' TO END INPUT): $TAPE
HP COBOL opens the tape drive you specify.
If a DEFINE exists for the tape file and you specify a different device in response to an HP COBOL
mount message, the HP COBOL run-time library alters the DEVICE attribute of the file’s DEFINE.
If no DEFINE exists for the tape file, the HP COBOL run-time library creates a DEFINE with the
required attributes (including the DEVICE attribute).
The new DEVICE attribute value or the new DEFINE remains active until one of these occurs:
The HP COBOL process terminates.
The HP COBOL process uses a DEFINE procedure to change the value of the DEVICE attribute
or to delete the DEFINE.
The HP COBOL run-time library changes the value of the DEVICE attribute when you specify
a different device for the file in response to another HP COBOL mount message.
Labeled Tapes
A mount message from the labeled-tape processing software usually does not specify a device on
which to mount the tape. The labeled-tape processing software uses automatic volume recognition
to find a tape volume on one of the system’s tape drives, so you or the operator can mount the
tape on any available tape drive. For a continuation reel of a multitape file, however, a mount
message from the labeled-tape processing software specifies the same device as the first reel.
Run-Time Errors
Table 119 Run-Time Errors Specific to Tape File Use
Text of Message (in Non-CRE Environment)Message Number (CRE)
MULTIPLE FILE TAPE file not on tape170
OPEN positioning for MULTIPLE FILE TAPE failed171
OPEN I-O for file not on input-output device214
Wrong or missing LABELS attribute215
Wrong or missing USE attribute216
Wrong or missing RECFORM attribute217
Wrong or missing RECLEN attribute218
Wrong or missing BLOCKLEN attribute219
Wrong or missing FILESEQ attribute220
Wrong or missing DEVICE attribute221
A DEFINE procedure failed with error nnn222
DEFINE required for LABEL RECORDS STANDARD223
854 Tape Input and Output