dfindfi - find first record in secondary index
rno_t dfindfi (buffer, fcb)
Dfindfi finds the first record in a secondary index and returns the record in buffer. The beginning values in buffer are ignored by dfindfi. Dfindfi also saves the current position in the secondary index, and additional records may be fetched in secondary key order by calling dfindni(C-3).
An RMSfile may have several secondary indexes that are used to retrieve records by other than the primary key value. Before calling dfindfi, call dseti(C-3) to select the desired secondary index.
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), dfindni(C-3), dread(C-3)
RMS Programming Guide
Dfindfi returns a value of BAD (-1) if an I/O error occurred or if the secondary index is empty. If no record is found, the contents of buffer are undefined.