If you suspect that VSAM RLS latch contention is causing a hang
or deadlock, use the following operator command:
DISPLAY SMS,SMSVSAM,DIAG(CONTENTION)
This command will produce a console message that either:
- Displays all latch contention active on the system (if any), or
- Indicates that there is no latch contention on this system.
An example of output showing latch contention is:
09.55.29 SYSTEM1 IGW343I VSAM RLS DIAG STATUS (V.01)
|---RESOURCE----| |------ WAITER ------| |--HOLDER---| ELAPSED
TYPE ID JOB NAME ASID TASK ASID TASK TIME
-------- -------- -------- ---- -------- ---- -------- --------
LATCH 7F158C70 SMSVSAM 003A 008DA250 003A 008D7218 00:00:06
DESCRIPTION: IGWLYSPH - SHM OBJECT POOL
LATCH 7F151E78 SMSVSAM 003A 008D7218 003A 008DC1C8 00:00:21
DESCRIPTION: IGWLYDTS - SHM OBJECT POOL
LATCH 7BAD43B8 SMSVSAM 003A 008DC1C8 002D 007F3000 00:19:09
LATCH 7BAD43B8 SMSVSAM 003A 008D5A48 002D 007F3000 00:22:09
LATCH 7BAD43B8 SMSVSAM 003A 008D6938 002D 007F3000 00:33:23
LATCH 07F1B1D0 SMSVSAM 003A 008D64F8 003A 008D6CF0 01:47:20
LATCH 07F1D3B8 SMSVSAM 003A 008D6CF0 0000 00000000 11:23:30
In
this example, the numbers in the "ELAPSED TIME" column represent the
time a latch has been in contention.
If latch contention is indicated, you can then take appropriate
actions to resolve the hang or deadlock. These actions may range
from canceling batch jobs or CICS® regions
(client requests) to terminating an instance of the SMSVSAM server.
When deciding what action to take, consider the following:
- If the holder of a latch that is holding other threads is a cross
memory task from a client address space (such as a CICS transaction or batch job), you could then cancel
that task or job. However, if the holder is a very important job,
and the waiters are not as important, then you might decide to wait
for the busy shift to finish and cancel the job during the off-shift.
- If the holder of a latch is itself waiting for an ENQ that is
held in another system, then you should consider issuing the DISPLAY
SMS,SMSVSAM,DIAG(CONTENTION) command on the other system to see if
there is a problem there.
- If the holder of a latch is itself waiting for I/O or any other
system resource, then you should investigate why that resource is
not available or slow to respond.
- If the holder of a latch is an SMSVSAM (VSAM RLS) thread, then
you might need to restart the SMSVSAM address space. Before doing
this, however, you should consider the consequences of restarting
the server immediately, versus waiting for the off-shift. Even though
some work might be stalled, there could be some other more important
work that is still progressing.
For more information on the DISPLAY SMS,SMSVSAM,DIAG(CONTENTION)
command, refer to z/OS MVS System Commands.