IBM SC34-7012-01 Implicit enqueuing on DL/I databases with DBCTL, Direct methods HDAM, HIDAM

Models: SC34-7012-01

1 268
Download 268 pages 41.5 Kb
Page 170
Image 170

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:

vWRITEQ TS

vDELETEQ 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:

vEXEC CICS ENQ RESOURCE

vEXEC CICS DEQ RESOURCE

You can use these commands to perform the following functions:

vProtect data written into the common work area (CWA), which is not automatically protected by CICS

vPrevent transaction deadlock by enqueuing on records that might be updated by more than one task concurrently

vProtect 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.

158CICS TS for z/OS 4.1: Recovery and Restart Guide

Page 170
Image 170
IBM SC34-7012-01 manual Implicit enqueuing on DL/I databases with DBCTL, Explicit enqueuing by the application programmer