dtfindk - find field numbers in secondary index
#include
struct kd *dtfindk (fp, indexno)
DICT *fp;
int indexno;
An RMSfile may contain secondary indexes that are used to look up
records by fields other than the primary key values. There may be
several secondary indexes for one RMSfile. These secondary
indexes are numbered from 1 to the number of secondary indexes
in the RMSfile. Up to eight data fields can be used in one
secondary index. Dtfindk returns a pointer to a structure that
contains the field numbers in the secondary index specified by
the indexno parameter. The value returned is a pointer to a
structure that is defined in the include file
Fp is the value returned from dtdict(C-3)
or dtopen(C-3).
As a special case, if dtfindk is called with a indexno value of
zero, dtfindk returns the data field numbers for the primary key.
dtdict(C-3), dtopen(C-3),
dtfindi(C-3)
Chapter 4, RMS Programming Guide
DIAGNOSTICS
A value of NULL is returned if the indexno parameter is less than
zero or greater than the number of secondary indexes contained in
the RMSfile or if fp is not an opened RMS dictionary file.
The returned value points to static data whose contents are
overwritten with every call.