z/VSE: Waiting for locked resource (X'8E')
Ingolf24 120000DRN3 Visits (1354)
Last Friday Jeff had a question about the z/VSE Lock Manager on VSE-L.
The STATUS command showed "M0052 N5 TCS006R 8E WAITING FOR LOCKED RESOURCE USED BY N7". He wanted to know the resource name and got good tips from the VSE community.
If the task is in bound condition X'8E', you can get the locked resource from TIBSTATE.
The TIBSTATE is at offset 4 of the Task Information Block (TIB). STATUS N5 shows the status of all tasks in partition N5 including their TIB and save area addresses. You may need to adjust the address in TIBSTATE. The low order bit may be on, which indicates, that the task wants to have the resource exclusively.
LOCKTAB and OWNER elements are Lock Manager control blocks, that describe the locked resource and owning task(s).
The resource name is at offset 8 of the LOCKTAB entry. The address to the (first) OWNER element is at offset 0. The OWNER element has the owning task id at offset 4. The address of the next OWNER element, if any, is at offset 0.
More information about z/VSE's Lock Manager is in the z/VSE Supervisor Diagnosis Reference and z/VSE Hints & Tips books. You can download these books from the z/VSE Technical Articles and Whitepapers - here.
In these books you can find information about the LOCK SHOW and LOCK TRACE console commands as well as the lock file (and lock file error) too. See also my blog post about lock file error - here.
You can select more information about the z/VSE Lock Manager in this blog, if you use the tag lock in "Find a Tag".