DUPDATE C-3

NAME

dupdate - update current record

SYNOPSIS

#include <cbase/dirio.h>

rno_t dupdate (buffer, fcb)

char *buffer;

DFILE *fcb;

DESCRIPTION

Dupdate changes the data of the current record in an opened RMSfile. The key and data of the record to change must be in buffer prior to calling dupdate. Although the key is required to be in buffer, primary key changes are not allowed. If the RMSfile contains secondary keys, the index key values are updated at the time of the call to dupdate.

Fcb is the file block pointer returned by dlopen(C-3) or dopen(C-3).

The returned record numbers may be saved and used on a subsequent call to dread(C-3). The contents of buffer remain unchanged.

SEE ALSO

dlopen(C-3), dopen(C-3), dread(C-3)

Chapter 4,

RMS Programming Guide

DIAGNOSTICS

A value of BAD (-1) is returned if there is an I/O error, if an attempt is made to change the key or if the current record has not been defined at the time of the call to dupdate.