gtpc2m7fC/C++ Language Support User's Guide

tbspc-Backspace General Tape and Wait

This function backspaces a general tape a specified number of records and waits until the tape is correctly positioned before returning control to the user. If this function is issued to a tape that is mounted in blocked mode, a system error will occur.

Format

#include   <tpftape.h>
int        tbspc(const char *name, enum t_lvl level, int fallback);

name
This argument is a pointer to type char, which must be a 3-character string identifying the tape to be backspaced. This function can only be called for a general tape.

level
One of 16 possible values representing a valid data level from the enumeration type t_lvl, expressed as Dx, where x represents the hexadecimal number of the level (0-F). This parameter specifies the FARW from which the number of records to backspace is to be obtained, right justified in CE1FAx.

fallback
This argument applies when operating a on a multivolume tape file. If FALLBACK is specified, the previous volume is mounted if the load point was reached on the current volume and more records exist to backspace. If NO_FALLBACK is specified, backspacing stops at the load point with no fallback to the previous volume.

Normal Return

Integer value of zero if the operation is successful.

Error Return

The value of CE1SDx is returned if an I/O error occurs.

Programming Considerations

Examples

The following example backspaces the VPH tape by the specified number of records.

#include <tpftape.h>
int recs = 3;

  ·
  ·
  ·
(*((short *)&ecbptr()->ce1fh9)) = recs; if (tbspc("VPH",D9,FALLBACK)) { serrc_op(SERRC_EXIT,0x1234,"ERROR BACKSPACING VPH TAPE",NULL) ; }

Related Information