Guardian Programmer's Guide

Table Of Contents
Communicating With Magnetic Tape
Guardian Programmer’s Guide 421922-014
12 - 9
Spacing Forward and Backward by Record Blocks
.
NUMBER^OF^RECORDS := 2;
CALL CONTROL(TAPE^NUM,
SPACE^BACK^RECORDS,
NUMBER^OF^RECORDS);
IF <> THEN ...
If the tape is positioned immediately after the EOF mark (for example, following a
space file forward operation), CONTROL operation 10 causes the tape to move to just
before the same EOF mark. Error 1 is returned:
NUMBER^OF^RECORDS := 5;
CALL CONTROL(TAPE^NUM,
SPACE^BACK^RECORDS,
NUMBER^OF^RECORDS);
IF <> THEN ...
Similarly, the next example tries to space backward eight record blocks when the tape
is positioned somewhere in the middle of the file and there are fewer than eight record
blocks between the current tape position and the beginning of the file. The tape stops
immediately before the EOF mark, and error 1 is returned to the program:
NUMBER^OF^RECORDS := 8;
CALL CONTROL(TAPE^NUM,
SPACE^BACK^RECORDS,
VST055.VSD
VST056.VSD