Guardian Programmer's Guide

Table Of Contents
Communicating With Magnetic Tape
Guardian Programmer’s Guide 421922-014
12 - 5
Spacing Forward and Backward by Files
Procedure calls that position by record block are valid for labeled and unlabeled tapes.
The file-movement operations are redundant when dealing with labeled tapes because
positioning is done using the FILESEQ and FILESECT values. The file-movement
operations are necessary for accessing the desired file on unlabeled tapes.
Tape positioning by record block applies to labeled and unlabeled tapes.
Spacing Forward and Backward by Files
CONTROL operation 7 moves the tape forward (toward the end-of-tape or EOT
sticker) a specified number of files. The operation stops when the specified number of
end-of-file (EOF) marks are encountered.
The following example shows how to use CONTROL operation 7 to space forward by
three files. The illustration assumes the following call is issued when the tape is
positioned at the beginning-of-tape (BOT) sticker. Note that the tape stops
immediately after the third EOF mark.
LITERAL SPACE^FWD^FILES = 7;
.
.
NUMBER^OF^FILES := 3;
CALL CONTROL(TAPE^NUM,
SPACE^FWD^FILES,
NUMBER^OF^FILES);
IF <> THEN ...
CONTROL operation 8 moves the tape backward (toward the BOT sticker) a specified
number of files. The operation stops either when the specified number of EOF marks
are encountered or on reaching the BOT sticker.
Note. The tape device must be open before you can use any of the tape-positioning
procedures. How you open the tape depends on whether you are using labeled or unlabeled
tape. For details on opening labeled tapes, see
Working With Standard Labeled Tapes later in
this section. For details on opening unlabeled tapes, refer to Working With Unlabeled Tapes.
Note. If the number of files on the tape is less than the number specified in the call to
C
ONTROL operation 7, then the tape will be pulled off the end of the reel. On 3480 devices,
such an operation also causes an end-of-tape error (error 150).
VST049.VSD