#include "tapeio.h"
FUNCTION c_tpfsr (unit, count, mode)
long *unit; long *count; long *mode;
Unit number to be used as a reference for the drive. This number is set by c_tpopen() and should not be altered.
Number of records to be skipped over. If end of file is encountered before all of the records are skipped, c_tpfsr() returns TAPE_EOF and count returns the number of records actually skipped. The tape is then positioned after the end of file.
A value of NO_HANDLE (0) specifies that errors are to be returned to the calling program. A value of HANDLE (1) specifies that when an error occurs the routine is to return an error to the calling program and display a message to the terminal.
The c_tpfsr() call is used to skip over count records on a tape device. Some examples of c_tpfsr() follow:
Tape location before, Tape location after call, called with count = 1 returns TAPE_SUCC, count = 1 | | V V ------------------------------ ------------------------------ | |E| |E| |E| |E|E| | |E| |E| |E| |E|E| | |O| |O| |O| |O|O| | |O| |O| |O| |O|O| | |R| |R| |R| |F|F| | |R| |R| |R| |F|F| ------------------------------ ------------------------------
Tape location before, Tape location after call, called with count = 4 returns TAPE_EOV, count = 2 | | V V ------------------------------ ------------------------------ | |E| |E| |E| |E|E| | |E| |E| |E| |E|E| | |O| |O| |O| |O|O| | |O| |O| |O| |O|O| | |R| |R| |R| |F|F| | |R| |R| |R| |F|F| ------------------------------ ------------------------------
Tape location before, Tape location after call, called with count = 4 returns TAPE_EOT, count = 2 | | V V ------------------------------ ------------------------------ | |E| |E| |E| |E| | |E| |E| |E| |E| | |O| |O| |O| |O| | |O| |O| |O| |O| | |R| |R| |R| |T| | |R| |R| |R| |T| ------------------------------ ------------------------------
c_tpfsr() returns
TAPE_SUCC (0) --> successful completion TPFSR_FSR --> device error TAPE_EOV --> end of volume TAPE_EOF --> end of file TAPE_EOT --> end of tape
Tape location before, Tape location after call, called with count = 4 returns TAPE_EOT, count = 3 | | V V ------------------------------ ------------------------------ | |E| |E| |E|E|E| | |E| |E| |E|E|E| | |O| |O| |O|O|O| | |O| |O| |O|O|O| | |R| |R| |F|F|F| | |R| |R| |F|F|F| ------------------------------ ------------------------------