D_RECSTAT

SUMMARY
d_recstat(dba,rts[,dbn])
DB_ADDR dba;
ULONG rts;
int dbn;

ARGUMENTS
dba The database address of the recird for which the timestamp
status is to be checked.

rts Last access timestamp of record to be checked.

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

DESCRIPTION
This function tests the timestamp status of the record stored at database
address dba agains the last access timestamp rts.If the record has not
been changed by anither program since it was last accessed by this
program ,status S_OKAY is returned.If the record has been deleted since
it was last accessed, status S_DELETED is returned.Ifthe record was
modified since last accessed,status S_UPDATED is returned.

CURRENCY CHANGES
None

RETURN CODES
0 S_OKAY The current record has not been changed by
another user since it was last accessed.

6 S_DELETED Record has been deleted.

7 S_UPDATED The current record has been modified since it
was last accessed.

-24 S_NOTLOCKED Record type is not locked.

-41 S_TIMESTAMP The current record type is not locked.

EXAMPLE
struct info irec;
DB_ADDR idba;
ULONG its ;
..
d_reclock(INFO,"r");
d_keyfind(ID_CODE,"db012");
d_recread(&irec);
d_crget(&idba);
d_gtscr(&its);
d_recfree(INFO);
... /* do some other processing*/
d_trbegin("infoupd");
d_reclock(INFO,"w");
if(d_recstat(idba,its) == S_UPDATED){
/* re-read record */
d_keyfind(d_CODE,"db012");
d_recread(&irec);
}
else if (db_status == S_DELETED){
... /* report deletion */
}
else if(db_status == S_OKAY){
... /* complete update */
}
d_trend();