IBM SC34-7012-01 Server User Manual


 
enqueuing on temporary storage queues where concurrently executing tasks can
read and change queue(s) with the same temporary storage identifier. (See
“Explicit enqueuing (by the application programmer).”)
Temporary storage control commands that invoke implicit enqueuing are:
v WRITEQ TS
v DELETEQ TS
Implicit enqueuing on DL/I databases with DBCTL
IMS
™™
program isolation scheduling ensures that, when a task accesses a segment
by a DL/I database call, it implicitly enqueues on all segments in the same
database record as the accessed segment.
How long it is enqueued depends on the access method being used:
Direct methods (HDAM, HIDAM)
If an ISRT, DLET, or REPL call is issued against a segment, that segment,
with all its child segments (and, for a DLET call, its parent segments as
well), remains enqueued upon until a DL/I TERM call is issued. The task
dequeues from all other segments in the database record by accessing a
segment in a different database record.
Sequential methods (HSAM, HISAM, SHISAM)
If the task issues an ISRT, DLET, or REPL call against any segment, the
entire database record remains enqueued upon until a DL/I TERM call is
issued. If no ISRT, DLET, or REPL call is issued, the task dequeues from
the database record by accessing a segment in a different database record.
The foregoing rules for program isolation scheduling can be overridden using the
‘Q’ command code in a segment search argument (this command extends
enqueuing to the issue of a DL/I TERM call), or by using PROCOPT=EXCLUSIVE
in the PCB (this macro gives exclusive control of specified segment types
throughout the period that the task has scheduled the PSB).
Explicit enqueuing (by the application programmer)
CICS provides enqueuing commands that can be useful in applications when you
want to protect data and prevent transaction deadlocks.
CICS provides the following explicit enqueuing commands:
v EXEC CICS ENQ RESOURCE
v EXEC CICS DEQ RESOURCE
You can use these commands to perform the following functions:
v Protect data written into the common work area (CWA), which is not
automatically protected by CICS
v Prevent transaction deadlock by enqueuing on records that might be updated by
more than one task concurrently
v Protect a temporary storage queue from being read and updated concurrently.
To be effective, however, all transactions must adhere to the same convention. A
transaction that accesses the CWA without using the agreed ENQ and DEQ
commands is not suspended, and protection is violated.
158 CICS TS for z/OS 4.1: Recovery and Restart Guide