gtpc2m8sC/C++ Language Support User's Guide

trewc-Rewind General Tape and Wait

This function causes an assigned general tape to be rewound. For multi-volume tape sets, an option may be specified to either rewind the current volume or fallback to the first record of the first volume. Control does not return to the caller until the operation is complete.

Format

#include   <tpftape.h>
int        trewc(const char *name, int fallback);

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

fallback
This argument applies when operating a multi-volume tape file. If FALLBACK is specified, the previous volume is mounted when load point is reached on the current volume. If NO_FALLBACK is specified, rewinding stops at the load point with no fallback to the previous volume.

Normal Return

Integer value of zero indicating successful completion.

Error Return

The nonzero integer value in CE1SUG is returned to the caller.

Programming Considerations

Examples

The following example rewinds the current physical volume of the VPH tape.

#include <tpftape.h>

  ·
  ·
  ·
waitc() trewc("VPH",NO_FALLBACK);

Related Information