Guardian Programmer's Guide

Table Of Contents
Communicating With Magnetic Tape
Guardian Programmer’s Guide 421922-014
12 - 2
Accessing Magnetic Tape: An Introduction
Accessing Magnetic Tape: An Introduction
Programmatic access to magnetic tapes is provided by the file-system procedures
listed below:
Table 12-1 summarizes all CONTROL operations that affect magnetic tape operation.
AWAITIO[X] Waits for the completion of outstanding I/O operations
pending on the open magnetic tape unit when operating in
nowait mode.
CONTROL Controls tape positioning and rewind operations. Forward
and backward positioning by record or file are supported.
See Table 12-1.
FILE_CLOSE_ Terminates access to an open magnetic tape unit.
FILE_GETINFO_ Provides error information and characteristics about an open
magnetic tape unit.
FILE_OPEN_ Establishes communication with the magnetic tape unit.
READ[X] Reads records from magnetic tape.
SETMODE Sets and clears buffered mode and streaming modes of
operation, and selects tape density. See Table 12-2.
SETMODENOWAIT Acts the same as SETMODE except that the magnetic tape
functions are applied in a nowait manner.
WRITE[X] Writes records to an open magnetic tape file.
Table 12-1. Magnetic Tape CONTROL Operations (page 1 of 2)
CONTROL
Number Operation
2 Writes an end-of-file mark.
3 Rewinds and unloads the tape without waiting for the operation to finish.
4 Rewinds the tape and takes it offline without waiting for the operation to finish
(not supported on the 5130, 5160, 5170, and 5180 tape drives).
5 Rewinds the tape and leaves it online without waiting for the operation to
fi
nish.
6 Rewinds the tape and leaves it online and waits for the operation to finish.
7 Spaces forward by a given number of files.
8 Spaces backward by a given number of files.
9 Spaces forward by a given number of records.