RECORDLOCKED Function

Returns the locked status of a file item.

Syntax

RECORDLOCKED({fileVar,}itemId)

Syntax Elements

fileVar Optional. The name of a variable containing a file reference (assigned via an OPEN statement). If omitted, the internal default file variable is used; that is, the file used is that most recently opened without a file variable.

itemId An expression that evaluates to the item-id of the required item.

Return Value

Returns the following values:

2 The current process has locked the item.

-2 Another process has locked the item.

0 Item is not locked.

MultiValue Compatibility

If you call the STATUS function immediately after the RECORDLOCKED function, if the item is locked STATUS returns the port number of the reality process that has locked the item; otherwise STATUS returns -1.