Chapter Contents

Previous

Next
kreplace

kreplace



Replace Record in Keyed File

Portability: SAS/C extension


SYNOPSIS
DESCRIPTION
RETURN VALUE
EXAMPLE
RELATED FUNCTIONS
SEE ALSO


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 VALUE

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


Chapter Contents

Previous

Next

Top of Page

Copyright © 2001 by SAS Institute Inc., Cary, NC, USA. All rights reserved.