kreplace -- Replace Record in Keyed File

SYNOPSIS

 #include <lcio.h>

 int kreplace(const void *rec, size_t length, FILE *f);
 

DESCRIPTION

The kreplace function replaces the current record of the keyed stream associated with the FILE object addressed by f with the data addressed by the rec argument. The argument length specifies the length of the replacement record. The new record must not change the key. Additionally, in an ESDS or RRDS, the record length must not be changed.

Replacement of a record does not change the file position. However, the updated record is no longer current and must be retrieved again before another update.

RETURN VALUES

The kreplace function returns 0 if no error occurs, or a negative value if an error occurs.

EXAMPLE

For an example of using kreplace, see VSAM I/O Example .

RELATED FUNCTIONS

kdelete, kinsert, kretrv

SEE ALSO


Copyright (c) 1998 SAS Institute Inc. Cary, NC, USA. All rights reserved.