U_PUT - put a record to a UFAS file.

Usage:

#include <ufas.h>
nbytes = u_put( record, length, fp[, relkey] );

Where:

char *record;
is the pointer to the record to be written.
int length;
is the number of bytes in the record to be written. This is the number of bytes written to a file with variable-length records. When fixed-length records are used, the record will be filled with garbage to the required length.
U_FILE fp;
specifies the file to be written to.
unsigned relkey;
specifies the key of the record to be written for UFF Relative files open for Random or Dynamic access.
int nbytes;
is the number of bytes actually written, or EOF if an error occurs. Note that this may be larger than "length" if the latter is smaller than the fixed record length for the file.

Description:

"u_put" writes a record to the named file.

If the file is open for Sequential access, the next record is written. Otherwise, the record specified by the given Relative key (for Relative files), or the Prime Key in the record (for Indexed and ISP files) is written. The error return is taken if a record having that key value already exists in the file.

Copyright © 1996, Thinkage Ltd.