Guardian Programmer's Guide

Table Of Contents
Communicating With Magnetic Tape
Guardian Programmer’s Guide 421922-014
12 - 6
Spacing Forward and Backward by Files
The next example shows CONTROL operation 8 used to space the tape backward by
one file, starting from the finish point of the previous example. Note that the tape stops
immediately before the EOF mark.
LITERAL SPACE^BACK^FILES = 8;
.
.
NUMBER^OF^FILES := 1;
CALL CONTROL(TAPE^NUM,
SPACE^BACK^FILES,
NUMBER^OF^FILES);
IF <> THEN ...
Then space the tape backward 10 files:
NUMBER^OF^FILES := 10;
CALL CONTROL(TAPE^NUM,
SPACE^BACK^FILES,
NUMBER^OF^FILES);
IF <> THEN
BEGIN
CALL GET_FILEINFO_(TAPE^NUM,
ERROR);
IF ERROR = 154 THEN ... !BOT
ELSE ... !Other error
Here, because there are fewer than 10 files preceding the start position, the tape
rewinds as far as BOT and the CONTROL operation returns error 154 (BOT detected
when backspacing).
VST050.VSD
VST050.VSD
VST051.VSD