D_KEYLSTAT

SUMMARY
d_keylstatl(FIELD,type[,dbn])
long FIELD;
char *type;
int dbn;

ARGUMENTS
FIELD The field type of the key field which is to be locked.

type A pointer to character variable to contain the current lock
type status.

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

DESCRIPTION
This function returns the calling process's current lock status for key
field, FIELD in the character variable pointed to by type. The lock types
which can be returned are as follows.

TYPE DESCRIPTION

'r' Read lock.
'w' Write lock.
'x' Exclusive lock.
'k' Keep lock.
's' Static record.
'f' Free .(the single user version will always return a 'f' status)

This function is present in the single user version of db_VISTA, but
performs no action.This allows multi-user applications to link with the
single user version for operations on stand-alone computers.

CURRENCY CHANGES
None.

RETURN CODES

-5 S_INVFLD Invalid field type.

-17 S_NOTKEY FIELD is not a key field.

EXAMPLE

char lstat;
.....
d_keylstat(ID_CODE,&lstat);
if (lstat=='f')
d_keylock(ID_CODE,"r");