D_KEYFIND

SUMMARY
d_keyfind(FIELD,value,[,dbn])
long FIELD;
char * value;
int dbn;

ARGUMENTS
FIELD The field type of the key field on which yo search.

value A pointer to data to be searched .

dbn (optional) The number of the database containing the record.

DESCRIPTION
Function d_keyfind finds a record occurence based on the value supplied
for the specified key field.Whether or not the key is found, the key field
will remain positioned so that a subsequent d_keynext(or d_keyprev) call
will return the record with the next higher ( or lower ) key value. If
value is NULL ,the key field will be positioned at the beginning so that
d_keynext will return the first key on file.

CURRENCY CHANGES
curr_rec=found record;

RETURN CODES

0 S_OKAY A matching key occurence was found.

2 S_NOTFOUND A matching key occurence was not found.

-5 S_INVFLD Invalid field type.You either did not pass a
field type or yuo passed field type which is
not in the current record.
-17 S_NOTKEY FIELD is not defined as a key.

-24 S_NOTLOCKED Key file containing FIELD is not locked.


EXAMPLE
char id[16]
...
/*display all database related info records
(those for whitch id begins whith "db")*/
d_keyfind(D_CODE,"db"); /*position to start of "db"s*/
while(d_keynext(ID_CODE) == S_OKAY)
{
d_keyread(id);
if( strncpm(id,"db",2)) break; /*no more "db"s*/
d_recread(&irec);
... /*print info record contens */
}