gtpc2m7oC/C++ Language Support User's Guide

topnc-Open a General Tape

This function makes the specified general tape available to the currently executing ECB.

Format

#include   <tpftape.h>
void       topnc(const char *name, int io, int bufmode);

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

io
This argument is treated as an integer describing whether the tape is to be read (input) or written (output). Use the defined terms INPUT to denote an input tape or OUTPUT to denote an output tape.

bufmode
Indicates if buffered mode of operation is to be used. This argument is ignored for input tapes. Use the defined terms NOBUFF to denote no buffering (write immediate mode), or BUFFERED to denote buffered write mode (preferred).

Normal Return

Void. The specified tape is positioned at the first record, and the tape has been assigned to the issuing ECB.

Error Return

Not applicable.

Programming Considerations

Examples

The following example opens the VPH tape for input in tape write immediate mode.

#include <tpftape.h>

  ·
  ·
  ·
topnc("VPH",INPUT,NOBUFF);

Related Information