The $ZLKID function returns the identification number of the first or next lock in the VMS distributed lock environment.
The syntax of the $ZLKID function is:
$ZLKID(tvexpr)
If the truth-valued expression is false (0), $ZLKID() returns the first accessible, currently active lock in the VMS distributed lock environment; if the truth-valued expression is true (non-zero), $ZLKID() returns the "next" lock, with respect to the last call to $ZLKID(); if $ZLKID() has a non-zero argument before it has a () argument, the function generates a run-time error.
If the last prior lock returned is the last lock accessible, $ZLKID() returns a null string.
$ZLKID() provides a tool for identifying VMS locks from within GT.M. Accessing information about locks belonging to other users requires WORLD or SYSLCK privileges. Consult your system manager if you feel you require additional privileges.