Guardian Programmer's Guide

Table Of Contents
Communicating With Magnetic Tape
Guardian Programmer’s Guide 421922-014
12 - 3
Accessing Magnetic Tape: An Introduction
On return from one of the calls listed in Table 12-1, the condition code should be CCE
if the CONTROL operation was successful. A condition code of CCL indicates an
error. A condition code of CCG indicates that an end-of-file mark was encountered.
Table 12-2 summarizes all SETMODE functions that relate to magnetic tape.
On return from one of the calls listed in Table 12-2, the condition code should be CCE
if the SETMODE function was performed successfully. A condition code of CCL
indicates an error. A condition code of CCG indicates that the attempted SETMODE
function is invalid for the type of device.
For complete details of these procedure calls, CONTROL operations, and SETMODE
functions, refer to the Guardian Procedure Calls Reference Manual.
Generally, the way you access a magnetic tape from an application program is as
follows:
1. Open the file associated with the magnetic tape device (using the FILE_OPEN_
procedure). An outline is given following Step 4.
2. Position the tape to the file/record that you intend to access (using the CONTROL
procedure). Refer to the next subsection, Positioning the Tape, for details.
10 Spaces backward by a given number of records.
24 Forces an end of volume. Unloads the current volume and requests the next
v
olume. This operation applies only to labelled tape.
26
Causes the tape process to flush all buffered records to tape
Table 12-2. Magnetic Tape SETMODE Functions
SETMODE
Number Function
52 Sets and clears short write mode to allow (or disallow) write operations of
l
ess than 24 bytes.
66 Sets the tape density. This SETMODE function also has the capability of
s
etting start/stop mode and streaming mode; however, SETMODE 119
should always be used instead. SETMODE 66 is not supported on G-series
releases.
99 Sets and resets buffered mode.
119 Sets start/stop or streaming mode. SETMODE 119 is not supported on
G
-series releases.
120 Changes the way the tape process reports the end of file.
162
Sets compression mode for tape drives that support compression.
Table 12-1. Magnetic Tape CONTROL Operations (page 2 of 2)
CONTROL
Number Operation