#include "worgen.h" #include "tapeio.h" #include "vll.h"FUNCTION c_tplswr (unit, key, clen, dlen, cbuf, dbuf, dtype)
long *unit; char *key; long *clen; long *dlen; char *cbuf; unsigned char *dbuf; char *dtype;
Unit number of an opened tape. The unit number is set by c_tpopen() and should not be altered.
Key of the record to be written. Spaces may be embedded in the key; however, right-justified spaces are ignored. If the key is NULL or a blank, the key written is blank.
The number of bytes (not counting the null terminator) in the character portion of the record to be written to tape.
The number of bytes in the data portion of the record to be written to tape.
Character buffer to be written to the character portion of the tape record.
Data buffer to be written to the data portion of the tape record.
Data type of the data portion of the record. Valid data types are:
= B: unsigned byte data = I2: signed two byte data = I4: signed four byte data = R4: four byte floating point data = R8: eight byte floating point data
The c_tplswr() call is used to write one label services record to tape. The label services function lsread is used to read label services records from a file.
The c_tplswr() function requires the tape to be opened with write access.
A key value of "DELETED" is invalid.
c_tplswr() returns
TAPE_SUCC (0) --> successful completion TAPE_FAIL (-1) --> operation failed TAPE_EOT (-3) --> end of tape encountered