dfindnm - find next matching record using secondary index
#include
rno_t dfindnm(buffer, fcb)
char *buffer;
DFILE *fcb;
Dfindnm searches for duplicate secondary keys. Before calling
dfindnm, call dseti(C-3) to select the desired
secondary index.
Call dfindm(C-3) to find the first key value in
the secondary
index. Each subsequent call to dfindnm returns the next record in
secondary key order whose keys match the record returned by
dfindm(C-3). If dnumidx(C-3)
has been called prior to this
function, only the first n fields of the current index are
compared; otherwise, all fields of the current index are
compared. The beginning contents of buffer are ignored by
dfindnm.
Dfindnm maintains the current position in the secondary index, so
additional records may be fetched in secondary key order by
calling the dfindnm function repeatedly.
Fcb is the file block pointer returned by dlopen(C-3)
or
dopen(C-3).
The returned record number may be saved and used on a subsequent
call to dread(C-3).
dlopen(C-3), dopen(C-3),
dseti(C-3), dfindm(C-3),
dread(C-3),
dfindpm(C-3), dnumidx(C-3)
Chapter 4, RMS Programming Guide
Dfindnm returns a value of BAD (-1) if an I/O error occurred or
if there is no record that contains field values equal to the
last values returned. If no record is found, the contents of
buffer are undefined.