NET/MASTER Network Control Language (NCL) Reference Manual

LOCK
Verbs
3–118 106126 Tandem Computers Incorporated
When TYPE=TEST is specified, the &SYS.RETCODE system variable is set as
follows:
Return
Code
Description
0 No other NCL process has shared or exclusive control of the resource or is testing the
resource.
4 The request would fail because this NCL process already has control of the resource.
The &SYS.LOCK.MSG system variable is set to the text of the existing lock. The
&SYS.FDBK system variable is also set; this is described by a later consideration.
8 Another NCL process has control of the resource. The &SYS.LOCK.MSG system
variable contains the text of the oldest request that obtained control of the resource.
The &SYS.FDBK system variable is also set; this is described by a later
consideration.
When TYPE=FREE is specified, the &SYS.RETCODE system variable set as
follows:
Return
Code
Description
0 Shared or exclusive control of the resource has been released by this NCL process.
The &SYS.LOCK.MSG system variable contains the text of the request just released.
The &SYS.FDBK system variable is also set; this is described by a later
consideration.
4 The request is ignored. This NCL process has no LOCK control, either shared or
exclusive, of the supplied resource.
The following values may be set for the &SYS.FDBK system variable, depending
on the value of the &SYS.RETCODE system variable:
Value of
&SYS.RETCODE
Value of
&SYS.FDBK Description
0 0 LOCK is held shared.
0 4 LOCK is held exclusive.
4 0 LOCK is already held shared.
4 4 LOCK is already held exclusive.
4 8 A LOCK conflict has been detected.
8 0 LOCK is held shared (TYPE=EXCL only).
8 4 LOCK is held exclusive.
8 8 A TEST request has been made against the resource.
12 0 LOCK is held shared (TYPE=EXCL only).
12 4 LOCK is held exclusive.