c_tplswr - Writes one label services record to tape

SYNTAX

#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;

PARAMETERS

unit (input, integer)

Unit number of an opened tape. The unit number is set by c_tpopen() and should not be altered.

key (input, character, length (1:KEYL))

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.

clen (input, integer)

The number of bytes (not counting the null terminator) in the character portion of the record to be written to tape.

dlen (input, integer)

The number of bytes in the data portion of the record to be written to tape.

cbuf (input, character, length(clen))

Character buffer to be written to the character portion of the tape record.

dbuf (input, unsigned char, length(dlen))

Data buffer to be written to the data portion of the tape record.

dtype (input, character, length(2))

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

DESCRIPTION

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.

RETURN VALUE

c_tplswr() returns

     TAPE_SUCC (0)  -->  successful completion 
     TAPE_FAIL (-1) -->  operation failed
     TAPE_EOT  (-3) -->  end of tape encountered