gtpc2m7o | C/C++ Language Support User's Guide |
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
- The tape specified as the name argument must not be open at the
time of the function call.
- The tape specified as the name argument must be defined to the
system.
- The tape specified as the name argument must be a general tape,
not a real-time tape. Real-time tapes have RT as the first 2
characters of their name.
- If the tape is not physically ready or logically mounted, appropriate
message(s) are sent to the prime CRAS for operator intervention.
Control is not returned to the operational program until the tape is ready to
be processed.
Examples
The following example opens the VPH tape for input in tape write immediate
mode.
#include <tpftape.h>
·
·
·
topnc("VPH",INPUT,NOBUFF);
Related Information