gtpc2m8rC/C++ Language Support User's Guide

tprdc-Read General Tape Record

This function reads a record from an assigned general tape.

Format

#include  <tpftape.h>
void      tprdc(const char *name, enum t_lvl level, enum t_blktype size);

name
This argument is a pointer to type char, which must be a 3-character string identifying the tape to be read from. 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). The record being read from tape is attached to this level.

size
Storage block list type which is placed on the indicated CBRW. This argument must belong to the enumeration type t_blktype, defined in tpfapi.h. The record length incoming from tape must match the size of the indicated pool storage type. Use Lx notation, where x is a valid pool type:

L0
127 bytes

L1
381 bytes

L2
1055 bytes

L4
4095 bytes.

Normal Return

Void.

Error Return

Not applicable.

Programming Considerations

Examples

The following example reads a 1055-byte record from the VPH tape to level D2. A message is issued if an I/O error occurs.

#include <tpftape.h>

  ·
  ·
  ·
tprdc("VPH",D2,L2); if (waitc()) { serrc_op(SERRC_EXIT,0x1234,"ERROR READING VPH TAPE",NULL) ; }

Related Information