Guardian Programmer's Guide

Table Of Contents
Communicating With Magnetic Tape
Guardian Programmer’s Guide 421922-014
12 - 8
Spacing Forward and Backward by Record Blocks
NUMBER^OF^RECORDS);
IF <> THEN ...
The next example shows the magnetic tape spacing forward a number of record blocks
beyond the EOT sticker. The forward spacing continues because the tape has not yet
reached the end of the file:
NUMBER^OF^RECORDS := 4;
CALL CONTROL(TAPE^NUM,
SPACE^FWD^RECORDS,
NUMBER^OF^RECORDS);
IF <> THEN ...
CONTROL operation 10 moves the tape backward (toward the BOT sticker) a
specified number of record blocks. This operation stops when either the tape has
spaced backward over the specified number of record blocks or an EOF mark or BOT
sticker is encountered. Encountering an EOF mark means that the tape has rewound
to the beginning of the file; the tape is positioned immediately before the EOF mark.
Encountering the BOT sticker means that the tape has rewound to the beginning of the
tape; the tape stops immediately after the BOT sticker, and error 154 is returned to the
program.
The following examples show how to space backward by record blocks using
CONTROL operation 10. The first example spaces the tape backward two record
blocks from an initial tape position just before EOF:
LITERAL SPACE^BACK^RECORDS = 10;
.
Note. To achieve better performance, you should avoid backspacing by record blocks on the
3209/5120 tape subsystems.
VST053.VSD
VST054.VSD