Guardian Programmer's Guide

Table Of Contents
Communicating With Magnetic Tape
Guardian Programmer’s Guide 421922-014
12 - 70
Working With Unlabeled Tapes
Working With Unlabeled Tapes
Any tape that does not have standard ANSI, IBM or TMF labels (or for a backup tape
either BACKUP or IBMBACKUP labels) is an unlabeled tape. Use the methods
described in this subsection for handling either tapes produced by other vendors that
don’t have IBM or ANSI labels or tapes produced on HP systems without using
standard labeled tape processing.
Accessing Unlabeled Tapes
You gain access to an unlabeled tape by opening the file name of the drive the tape is
mounted on. To do this, either:
Open the tape-drive using a DEFINE, specifying the tape-file name in the DEVICE
attribute and setting the LABELS attribute to “OMITTED.”
Pass the tape-drive name or logical device number to the FILE_OPEN_ procedure.
In either case, you need operator permission to open the file if labeled tape processing
is turned on and the operator has set NLCHECK permission using the MEDIACOM
utility or the TAPECOM utility. In this case, a message is sent to the operator to enable
the operation.
Using the DEFINE method, you can access a labeled tape as if it had no labels by
setting the LABELS attribute to “BYPASS.” You need operator permission to open the
file if labeled tape processing is turned on and the operator has set BLPCHECK
permission using the MEDIACOM utility or the TAPECOM utility. In this case, a
message is sent to the operator to enable the operation.
The following example creates a DEFINE for an unlabeled tape mounted on tape drive
$TAPE1:
!Turn on DEFINE mode:
NEW^VALUE := 1;
ERROR := DEFINEMODE(NEW^VALUE,
OLD^VALUE);
IF ERROR > 0 THEN ...
!Set the CLASS attribute to TAPE:
ATTRIBUTE^NAME ':=' "CLASS ";
ATTRIBUTE^VALUE ':=' "TAPE" -> @S^PTR;
ERROR := DEFINESETATTR(ATTRIBUTE^NAME,
ATTRIBUTE^VALUE,
@S^PTR '-' @ATTRIBUTE^VALUE,
DEFAULT^NAMES);
IF ERROR <> 0 THEN ...
!Set the LABELS attribute to OMITTED:
ATTRIBUTE^NAME ':=' "LABELS ";
ATTRIBUTE^VALUE ':=' "OMITTED" -> @S^PTR;