Materialize Process Record Locks (MATPRECL)
Instruction Syntax
| Op Code (Hex) | Operand 1 | Operand 2 |
|---|---|---|
| 031E | Receiver | Process selection template |
Operand 2: Space pointer.
| Bound Program Access |
|---|
|
Description:
Data space record locks for a process identified in the process selection template specified by operand 2 are materialized into the receiver identified by operand 1. The materialization identifies each data space record lock which is either held by the process or is waited for by a thread within the process.
The process selection template identified by operand 2 must be 16-byte aligned. The format of the process selection template is as follows:
| ||||||||||||||||||||||||||||||||||||||||||||||||
The process description must be a system pointer to a process control space (PCS) or a null pointer value. If the pointer is null, locks for the process containing the current thread are materialized. If it is a system pointer, the requester must be a thread in either the subject process or the process that initiated subject process, or the requesting thread must have process control special authorization in its user profile or an adopted user profile.
Both of the fields specified under lock selection are bits which determine the locks to be materialized. If the materialize held locks is materialize, any database record lock held by the process is materialized. If the materialize locks waited for is materialize, any database record lock a thread of the process is waiting for is materialized.
The format for lock counts bit determines the format of the lock held count and lock wait count fields in the materialization template. If the bit is set on then UBin(4) counts are used, else Bin(2) counts are used. UBin(4) counts are recommended, to simplify processing for more than 32,767 locks.
The materialization template identified by operand 1 must be 16-byte aligned. The format of the materialization is as follows:
| ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
The first 4 bytes of the materialization identify the total bytes provided for use by the instruction. This value is supplied as input to the instruction and is not modified by the instruction. A value of less than 8 causes the materialization length invalid (hex 3803) exception to be signaled.
The second 4 bytes of the materialization identify the total bytes available to be materialized, limited to 2,147,483,647 if more locks are available than fit in a template of that size. The instruction materializes as many bytes as can be contained in the area specified as the receiver. If the byte area identified by the receiver is greater than that required to contain the information requested, the excess bytes are unchanged. No exceptions are signaled in the event that the receiver contains insufficient area for the materialization, other than the materialization length invalid (hex 3803) exception described previously.
Lock held count is the total number of locks held that match materialization criteria, limited to 32,767 for Bin(2) format. Lock wait count is the total number of lock waits that match materialization criteria, limited to 32,767 for Bin(2) format.
The number of entries in the lock held descriptions array is the lesser of total locks held that match materialization criteria and the number of entries that fit in the template using bytes provided, except the array is limited to 32,767 entries for Bin(2) lock counts when lock wait count is nonzero. Each entry contains a system pointer to the data space, relative record number in the data space, and lock state. When lock scope has a value of lock is scoped to the thread, the thread ID field identifies the thread that holds the lock.
A database weak record lock is only acquired thread-scoped and it only conflicts with update record locks which are thread-scoped to a different thread. The weak record lock does not conflict in any other situation.
The number of entries in the lock wait descriptions array is the lesser of total lock waits that match materialization criteria and the number of entries after the lock wait descriptions array that fit in the template using bytes provided. Each entry contains a system pointer to the data space, relative record number in the data space, and lock state requested. The thread ID field identifies the thread that is waiting for the lock, regardless of the lock scope value.
Authorization Required
- Process control special authorization
- To materialize locks for a process that is neither the current process nor a process initiated by the current process
- Execute
- Contexts referenced for address resolution
Lock Enforcement
- Materialize
- Contexts referenced for address resolution
Exceptions
- 06 Addressing
- 0601 Space Addressing Violation
- 0602 Boundary Alignment
- 0603 Range
- 08 Argument/Parameter
- 0801 Parameter Reference Violation
- 0A Authorization
- 0A01 Unauthorized for Operation
- 0A04 Special Authorization Required
- 10 Damage Encountered
- 1004 System Object Damage State
- 1005 Authority Verification Terminated Due to Damaged Object
- 1044 Partial System Object Damage
- 1A Lock State
- 1A01 Invalid Lock State
- 1C Machine-Dependent
- 1C03 Machine Storage Limit Exceeded
- 20 Machine Support
- 2002 Machine Check
- 2003 Function Check
- 22 Object Access
- 2201 Object Not Found
- 2202 Object Destroyed
- 2203 Object Suspended
- 2207 Authority Verification Terminated Due to Destroyed Object
- 2208 Object Compressed
- 220B Object Not Available
- 24 Pointer Specification
- 2401 Pointer Does Not Exist
- 2402 Pointer Type Invalid
- 2403 Pointer Addressing Invalid Object Type
- 2E Resource Control Limit
- 2E01 User Profile Storage Limit Exceeded
- 36 Space Management
- 3601 Space Extension/Truncation
- 38 Template Specification
- 3801 Template Value Invalid
- 3803 Materialization Length Invalid
- 44 Protection Violation
- 4401 Object Domain or Hardware Storage Protection Violation
- 4402 Literal Values Cannot Be Changed