gtpc2m7jC/C++ Language Support User's Guide

tdspc_v-Retrieve VOLSER for a Specified Tape Name

This function is used to retrieve the tape volume serial number (VOLSER) for the specified tape name.

Format

#include <tpftape.h>
tpvstat *tdspc_v (const char *name,
                        char  type,
                  enum  t_lvl level);

name
A pointer to type char, which must be a 3-character string identifying the tape whose status will be obtained.

type
Indicates whether the active or standby tape status will be checked.

ACTIVE
Used to specify the active tape.

STANDBY
Used to specify the standby tape.

level
One of 16 possible values representing a valid data level from enumeration type t_lvl, expressed as Dx, where x represents the hexadecimal number of the level (0-F). This parameter identifies the file address reference word (FARW) on which the status information will be placed.

Normal Return

When completed successfully, the return code will point to the tpvstat structure that was placed in the FARW of the data level specified.

Error Return

An error return is indicated by a zero return code.

Programming Considerations

When returned, the data level will be unchanged, but the FARW will contain the VOLSER and tape module number.

Examples

The following example retrieves the VOLSER from the tape name indicated.

#include <tpftape.h>
long example()
{
char *tape_name;
struct tpvstat   *tape_volser_status;
 

  ·
  ·
  ·
tape_volser_status = tdspc_v (tape_name,ACTIVE,DF); printf("the volser is %6s\n",tape_volser_status->vsn);
  ·
  ·
  ·
}

Related Information