ENQMODEL resources

An ENQMODEL defines a named resource for which the EXEC CICS ENQ and EXEC CICS DEQ commands have a sysplex-wide scope.

CICS® uses ENQMODEL resources with z/OS® global resource serialization to provide sysplex-wide protection of resources that are used by multiple applications. Local enqueues within a single CICS region are managed in the CICS address space. Sysplex-wide enqueues that affect more than one CICS region are managed by z/OS global resource serialization. For more information on global resource serialization, see z/OS MVS Planning: Global Resource Serialization.

When the EXEC CICS ENQ and EXEC CICS DEQ commands are issued for a resource, CICS checks for a matching installed ENQMODEL definition. The ENQSCOPE attribute of an ENQMODEL resource defines the set of regions that share the same enqueue scope. If the ENQSCOPE attribute remains blank (the default value), CICS treats any matching enqueue or dequeue request as local to the issuing CICS region. If the ENQSCOPE is non-blank, CICS treats the enqueue or dequeue as sysplex-wide, and passes a queue name and the resource name to z/OS global resource serialization to manage the enqueue.

z/OS global resource serialization can be configured in either a ring configuration, or a star configuration. For reasons of performance, a ring configuration is not recommended for production regions in a multisystem environment. You can also use the CICS system initialization parameter NQRNL to specify whether or not z/OS global resource serialization uses RNL processing for CICS enqueue requests, which can affect the scope of resources. For more information on configuring z/OS global resource serialization for CICS, see Global CICS enqueue and dequeue: improving performance.

You can display sysplex enqueues that are using z/OS global resource serialization facilities with the DISPLAY GRS command, for example:
D  GRS,RES=(DFHEqname|*,[  rname|,*])
where:
qname
specifies a 4-character ENQSCOPE defined by an ENQMODEL resource.
rname
specifies an ENQNAME defined by an ENQMODEL resource.

Sysplex-wide enqueue is supported only for a resource, and not for an enqueue on an address. It is not designed for the locking of recoverable resources.

Access to ENQMODEL resources

The CICS regions that need to use sysplex-wide enqueue or dequeue function must all have the required ENQMODEL resources defined and installed. The recommended way to ensure this is for the CICS regions to share a CSD, and for the initialization group lists to include the same ENQMODEL groups.

Applications use sysplex enqueues when you define appropriate ENQMODEL resources; no change is needed to the application programs. For applications where the resource name is configured dynamically, so is not known in advance, you can use the enqueue EXEC interface program exits XNQEREQ and XNQEREQC to supply characters at the start of the resource name that match a suitable ENQMODEL resource definition. For more information on these user exits, see XNQEREQ and XNQEREQC, enqueue EXEC interface program exits.