How tasks can become deadlocked waiting for exclusive control

Tasks can become deadlocked waiting for exclusive control of a CI only when they have shared control of the CI and then attempt to get exclusive control without relinquishing shared control first. This can only occur for VSAM shared resource data sets accessed in non-RLS mode.

For the deadlock to occur, a transaction must first issue a VSAM READ SEQUENTIAL request using EXEC CICS STARTBR. This is a VSAM shared control operation. It must then issue some VSAM request requiring exclusive control of the CI without first ending the shared control operation.

The requests that require exclusive control of the CI are:
  • VSAM READ UPDATE, using EXEC CICS READ UPDATE and then EXEC CICS REWRITE.

    Exclusive control of the CI is not acquired until after the initial read is complete, but it happens automatically after that and the CI is not released until the record has been rewritten.

  • VSAM WRITE DIRECT, using EXEC CICS WRITE.
  • VSAM WRITE SEQUENTIAL, using EXEC CICS WRITE MASSINSERT.

VSAM handles requests requiring exclusive control on a data set that is already being used in shared control mode by queueing them internally. VSAM returns control to CICS, but transactions waiting for exclusive control remain suspended.



dfhs12y.html | Timestamp icon Last updated: Monday, 5 June 2017