gtpc2m7hC/C++ Language Support User's Guide

tdspc-Display Tape Status

This function returns the status indicators and device address for active or standby tapes.

Format

#include      <tpftape.h>
struct tpstat *tdspc(const char *name, char type, enum t_lvl level);

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

type
Whether the active or standby tape status is to be checked. Use ACTIVE to specify the active tape, or STANDBY to specify the standby 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 identifies the FARW on which the status information is to be placed.

Normal Return

Pointer to structure tpstat (defined in tpftape.h) containing tape status. The indicated tape need not be assigned to the issuing ECB.

Error Return

NULL.

Programming Considerations

Real-time tape names can be given aliases, or tape pseudonames. These pseudonames are defined using RTMAP definitions in CEFZ. This mechanism provides a means for mapping many names to just a few tape devices.

Examples

The following example calls tdspc to examine the status of the active VPH tape.

#include <tpftape.h>
struct tpstat *status;

  ·
  ·
  ·
if ((status = tdspc("VPH", ACTIVE, D0)) == NULL) { serrc_op(SERRC_EXIT,0x1234,"VPH TAPE NOT MOUNTED",NULL) ; }

Related Information

None.