D_KEYFRST

SUMMARY
d_keyfrst(FIELD[,dbn])
long FIELD;
int dbn;

ARGUMENTS
FIELD The field type of the key field for which the first key
will be found.

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

DESCRIPTION
Function d_keyfrst finds a record occurence associated with the first
occurrence of the key FIELD .

CURRENCY CHANGES
curr_rec=record with first key;

RETURN CODES

0 S_OKAY First key was found.

2 S_NOTFOUND There are no keys on file for specified key field.

-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
/*display all info records in id_code order*/
for(d_keyfrst(ID_CODE);db_status == S_OKAY;
d_keynext(ID_CODE)){
d_recread(&irec);
.. /*print info record contens*/
}