Guardian Programmer's Guide

Table Of Contents
Communicating With Magnetic Tape
Guardian Programmer’s Guide 421922-014
12 - 27
Accessing Labeled Tapes
²
The RECFORM attribute specifies whether records are fixed length or variable
length. It has a value “F” for fixed or “U” for undefined (variable). The following
example sets the RECFORM attribute:
ATTRIBUTE^NAME ':=' "RECFORM "; !16 bytes
VALUE ':=' "F";
LENGTH := 1;
ERROR := DEFINESETATTR(ATTRIBUTE^NAME,
VALUE,
LENGTH,
DEFAULT^NAMES);
IF ERROR > 0 THEN ...
Specifying Tape Density
When writing data, to tape you can specify the tape density in bits per inch. The valid
densities are 1600 and 6250. By default, the system uses the density configured for
the tape drive at system-generation time. You do not need to set the tape density on
reading the tape; the tape controller automatically uses the density of the tape.
Specifically, the criteria for establishing the tape density are as follows:
If the user specifies the density, then the tape process uses that density.
Otherwise, if the tape is labeled, then the tape process uses the density indicated
in the tape label.
Otherwise, the tape process uses the tape density assigned to the device during
system generation.
Use the DENSITY attribute to set the tape density. The following example sets the
tape density to 1600 bits per inch:
ATTRIBUTE^NAME ':=' "DENSITY "; !16 bytes
VALUE ':=' "1600" -> @S^PTR;
ERROR := DEFINESETATTR(ATTRIBUTE^NAME,
VALUE,
@S^PTR '-' @VALUE,
DEFAULT^NAMES);
IF ERROR > 0 THEN ...
Specifying Other Tape DEFINE Attributes
In addition to the CLASS TAPE DEFINE attributes already discussed, you can specify
the following:
The tape device. Use the DEVICE attribute. Note that it is usually not necessary
to specify the tape device when accessing a labeled tape. This attribute is
commonly used with unlabeled tape processing.
The earliest date at which the tape can be overwritten. Use the EXPIRATION
attribute to specify the actual date or RETENTION to specify a number of days.