gtpc2m7rC/C++ Language Support User's Guide

tpcnc-Issue a User-Specified Control Operation CCW

This function is used to start a single control operation channel control word (CCW) for the specified tape name.

Format

#include <tpftape.h>
long tpcnc (const char  *name,
            enum  t_lvl  level);

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

level
One of 16 possible values representing a valid data level from enumeration type t_lvl, expressed as Dx, where x represents the hexadecimal number of the level (0-F). This parameter identifies the file address reference word (FARW), which contains a format-1 CCW. On return, the data level will be unchanged.

Normal Return

The normal return is a positive value.

Error Return

An error return is indicated by a zero return code. The details of the error can be obtained by examining the value in the CE1SUG field in the entry control block (ECB).

Programming Considerations

Examples

The following example writes a tapemark using the tpcnc function.

#include <tpftape.h>
long example()
{
  CW0CCW          temp_ccw;
  long            ioreturncode;
 
  temp_ccw.cw0ccw1.cw0cmd1 = tape_ccw_wtm;
  temp_ccw.cw0ccw1.cw0bct1 = 1;
  temp_ccw.cw0ccw1.cw0adr1 = 0;
  temp_ccw.cw0ccw1.cw0flg1 = 0;
  memcpy(&(ecbptr()->ce1faf),&temp_ccw,sizeof(temp_ccw));
 
  ioreturncode = tpcnc (token->ext_name,DF);
}

Related Information