Guardian Programmer's Guide

Table Of Contents
Communicating With Magnetic Tape
Guardian Programmer’s Guide 421922-014
12 - 10
Rewinding the Tape
NUMBER^OF^RECORDS);
IF <> THEN ...
The next example tries to space backward five record blocks but encounters the BOT
sticker. The tape stops immediately after the BOT sticker, and error 154 is returned to
the program:
NUMBER^OF^RECORDS := 5;
CALL CONTROL(TAPE^NUM,
SPACE^BACK^RECORDS,
NUMBER^OF^RECORDS);
IF <> THEN ...
Rewinding the Tape
The CONTROL procedure supports several operations that enable your program to
rewind a tape. You can choose to have the tape stop at the BOT sticker or unload
completely. You can choose to wait for the operation to finish or continue without
waiting for completion.
Use CONTROL operation 3 to rewind and unload the tape without waiting for
completion:
LITERAL REWIND^AND^UNLOAD = 3;
.
.
CALL CONTROL(TAPE^NUM,
REWIND^AND^UNLOAD);
IF <> THEN ...
Use CONTROL operation 4 to rewind the tape and take the tape offline without waiting
for completion. The tape stops at the BOT sticker.
LITERAL REWIND^OFFLINE = 4;
.
.
CALL CONTROL(TAPE^NUM,
REWIND^OFFLINE);
IF <> THEN ...
VST057.VSD
VST058.VSD