CICS ENQs
The CICS® ENQ/DEQ capability can be used by CICS applications to serialize access to named resources.
Originally, the scope of the serialization was within a single CICS region. If a transaction wanted exclusive access to a resource, it might issue the ENQ command, make whatever changes it wanted (with the knowledge that no-one else could be doing anything with that resource), and then issue the DEQ to release serialization. While all transactions that have an interest in that resource run in the same CICS region, then this is fine. However, it creates an affinity between all those transactions and that single CICS region. If a transaction in another CICS region tries to change that resource, it is not aware of the serialization that is held by the transaction in the original region.
To address this affinity, CICS provides the ability for the system programmer to specify that serialization requests for selected resources be externalized to GRS and therefore treated as sysplex-wide resources. These resources are defined by using ENQMODEL definitions. If a resource is defined by using ENQMODEL to be a sysplex-wide resource, you can now run the transactions that have an interest in that resource in many CICS regions, and all are aware of any serialization that results from a program that issues an ENQ request. The important point is that no application changes are required, as the control of whether the resource is to be treated as a local resource or a sysplex resource is at the CICS level.
For more information about the use of global ENQs and DEQs, see Using ENQ and DEQ commands with ENQMODEL resource definitions. For information about setting up the ENQMODEL definitions, see ENQMODEL resources.