General
Application area: | Distributed Lock Manager (DLM); see "Distributed Lock Manager (DLM)" |
Macro type: | Type S, MF format 3: C/D/L/M/E form; see "S-type macros" |
Macro description
The LKDEQ releases a lock request from the queue of an existing lock. When the last (or only) lock request is released, the lock itself is canceled. The LKDEQ macro may be called synchronously or asynchronously. The lock is identified by its ID (LOCKID), which is returned by the LKENQ macro. This lock ID must be specified when the LKDEQ macro is called.
The user may specify that the Lock Value Block is to be changed while a lock is released in PW or EX Mode (LVBCTL=*MOVE).
Macro formats and description of operands
LKDEQ |
MF=C / D / L / M / E ,ASYNCTL=*SYNCH / *ASYNCH / <var: enum-of _asyncctl_s:1> ,DEQEVTT=*SYNCH / *TUCONTI / *TUEVENT / <var: enum-of _evttype_s:1> ,DEQID=0 / <var: int:4> ,LOCKID=0 / <var: int:4> ,LSBADR=<var: pointer> ,LVBCTL=*IGNORE / *MOVE / <var: enum-of _lvbctl_s:l> ,STATUS=*UNCHANGE / *RESET / *INVALIDATE / <var: enum-of _status_s:1> ,USERPAR=0 / <var: int:4> ,PARAM=<var: pointer> / (reg: pointer>) ,PREFIX=N / p ,MACID=LDD / mac |
The operands are described in alphabetical order below.
ASYNCTL=
Control of an asynchronous lock request. If the lock request can be dequeued immediately, a contingency process or an event signal can be suppressed.
*SYNCH
If the lock request can be released immediately, a contingency process or an event signal is suppressed.
*ASYNCH
Even if the lock request can be released immediately, a contingency process or an event signal is generated.
<var: enum-of _asyncctl_s:1>
Name of the field with the asynchronous lock request at the time of execution.
DEQEVTT=
Describes the way in which release information is to be returned. There are three methods of control. The specified ID (contingency ID or event ID) is valid for the current release request. Other release requests from other tasks may specify different IDs.
*SYNCH
Synchronous lock request to dequeue the lock. Return from the macro if the lock has been released or an error condition detected. The release information is delivered in the return code.
*TUCONTI
Contingency process. This value must be specified to obtain confirmation of the release request during contingency processing.
*TUEVENT
Eventing. An event variable can be used to obtain the release information. The release information is supplied by calling the SOLSIG macro.
<var:enum-of _evttype_s:1>
Name of the field with the release information type at the time of execution.
DEQID=
ID for the lock request. Specifies, for asynchronous lock requests, which contingency ID or event ID is to be assigned to the information that the lock has now been released.
<var: int:4>
Default setting is 0.
The contingency ID or event ID.
MF=
For a general description of the MF operand, its operand values and any subsequent operands (e.g. PREFIX, MACID, and PARAM), see "S-type macros". The valid MF values are given at the start of the macro description under “Macro type” and are included in the macro format.
A PREFIX can be specified in the C form, D form or M form of the macro and additionally a MACID in the C form or M form.
LOCKID=
Lock ID of the lock which is to be dequeued.
<var: int:4>
Default setting is 0.
Lock ID of a previous LKENQ macro call, which is to be dequeued.
LSBADR=
Field with the address of the Lock Status Block. The Lock Status Block contains the Lock Value Block.
<var: pointer>
Name of the field with the address of the Lock Status Block.
LVBCTL=
Control of the Lock Value Block.
*IGNORE
The Lock Value Block is not used.
*MOVE
Read or write the Lock Value Block. The Lock Value Block can be read if the lock is allocated. It can be written if the lock is released in PW or EX Mode.
<var: enum-of _lvbctl_s:1>
Name of the field with the control of the Lock Value Block at the time of execution.
STATUS=
Specifies whether the lock status is validated when a lock is released in PW or EX Mode.
*UNCHANGE
The lock status is not changed while a lock is released in PW or EX Mode.
*RESET
The lock status is reset to VALID while a lock is released in PW or EX mode.
*INVALIDATE
The lock status is set to INVALID while a lock is released in PW or EX mode.
<var: enum-of _status_s:1>
Name of the field with the lock status change parameter at the time of execution.
USERPAR=
The parameter for asynchronous messages which are to be transferred to the contingency process or to eventing.
<var: int:4>
Default setting is 0.
User-defined values.
Return information and error flags
Standard header:
+---------------+ | | | | | |c|c|b|b|a|a|a|a| +---------------+
The following return code relating to the execution of the LKDEQ macro is transferred in the standard header
(cc=Subcode2, bb=Subcode1, aaaa=Maincode):
X'cc' | X'bb' | X'aaaa' | Meaning |
X'00' | X'00' | X'0000' | The macro was executed normally. The lock was dequeued. |
X'00' | X'00' | X'0001' | The macro was executed normally. The lock release request has been |
X'00' | X'01' | X'1005' | The Lock Status Block is not available. |
X'00' | X'01' | X'100C' | The specification in the LOCKID operand is invalid. |
X'00' | X'01' | X'1006' | The DEQID type is not the same as that specified in DEQEVTT. |
X'00' | X'01' | X'10FF' | An incorrect parameter, which has no specific return code, was specified. |
X'00' | X'20' | X'2001' | An internal error occurred. |
X'00' | X'20' | X'2003' | Internal error in connection with the resource block. |
X'00' | X'20' | X'2004' | Internal error in connection with a timeout. |
X'00' | X'20' | X'2005' | Internal error in connection with the lock request. |
X'00' | X'20' | X'2006' | Internal error in connection with XCS. |
X'00' | X'40' | X'4003' | The previous lock request has not yet been terminated. |
X'00' | X'82' | X'8004' | The lock has already been dequeued. |
Other return codes which, in accordance with conventions, apply to all macros are given in the table “Standard return codes” (Standard header).