DWRITE C-3

NAME

dwrite - write record using record number

SYNOPSIS

#include <cbase/dirio.h>

rno_t dwrite (buf, record, fcb)

char *buf;

rno_t record;

DFILE *fcb;

DESCRIPTION

Dwrite writes the record in buf at the record number specified by record where record is between 1 and number of records in the RMSfile. Record is returned by all calls that access the RMSfile.

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

Dwrite does not use the primary key values in the record to determine where the record shall be stored. That is specified solely by the record parameter. Dwrite is intended to be used only as a low level RMS access routine when alternate file access methods are desired.

If the RMSfile contains secondary keys, the key indexes are not updated by the call to dwrite.

SEE ALSO

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

Chapter 4,

RMS Programming Guide

DIAGNOSTICS

Dwrite returns a value of BAD (-1) if record is not within the range of valid records for the RMSfile or if fcb is not an opened RMSfile.