gtpc2m7qC/C++ Language Support User's Guide

toutc-Write Real-Time Tape Record

This function causes the record on the specified data level to be written to a real-time tape. The first four bytes of the file address reference word (FARW) of the data level specified must contain the address of the record to be written. The last 2 bytes of the FARW must contain the byte count of the record.

The toutc function does not return the block of storage to the appropriate pool but retains it on the specified level following return from a subsequent waitc.

Format

#include <tpftape.h>
void     toutc(const char *name, enum t_lvl level, int bufmode);

name
This argument is a pointer to type char, which must be a 3-character string identifying the tape to be written to. This function can only be called for a real-time 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 working storage block on this level is the record to be written to tape.

bufmode
Whether the 3480 being written to is written in buffered mode or write immediate mode. Use the defined terms NOBUFF to denote no buffering, or BUFFERED to denote buffered write mode.

Normal Return

Void.

Error Return

Not applicable.

Programming Considerations

Examples

The following example writes the working storage block on level D9 to the RTA tape in buffered mode. A message is issued if an I/O error occurs.

#include <tpftape.h>

  ·
  ·
  ·
ecbptr()->ce1fa9 = (long int) (ecbptr()->ce1cr9); /* get address in FARW */ (*((short int *)&(ecbptr()->ce1fh9))) = 128; /* length of record */ toutc("RTA",D9,BUFFERED); if (waitc()) { serrc_op(SERRC_EXIT,0x1234,"ERROR ON RTA TAPE",NULL) ; }

Related Information