Guardian Programmer's Guide

Table Of Contents
Communicating With Magnetic Tape
Guardian Programmer’s Guide 421922-014
12 - 7
Spacing Forward and Backward by Record Blocks
12 Communicating With Magnetic Tape
Spacing Forward and Backward by Record Blocks
CONTROL operation 9 moves the tape forward (toward the EOT sticker) a specified
number of record blocks. This operation stops when the end of the specified number
of record blocks is encountered. If an EOF mark is encountered, error 1 (EOF
detected) is returned to the program and the tape stops immediately after the EOF
mark. (Note that reaching the EOT sticker does not cause an error because the EOT
sticker is just a warning that the physical end of the tape is near.)
The following examples show how CONTROL operation 9 moves the tape forward.
The first example starts at the BOT sticker and moves the tape forward two record
blocks:
LITERAL SPACE^FWD^RECORDS = 9;
.
.
NUMBER^OF^RECORDS := 2;
CALL CONTROL(TAPE^NUM,
SPACE^FORWARD^RECORDS,
NUMBER^OF^RECORDS);
IF <> THEN ...
The next example also starts at the BOT sticker and then tries to space forward
10 record blocks. The operation stops because there are fewer than 10 record blocks
in the file. The CONTROL procedure returns error 1 and the tape stops immediately
after the EOF mark:
NUMBER^OF^RECORDS := 10;
CALL CONTROL(TAPE^NUM,
SPACE^FWD^RECORDS,
VST052.VSD