Enqueue EXEC interface sample exit program: DFH$XNQE

DFH$XNQE is a sample global user exit program for the enqueue EXEC interface. It is designed to be invoked at the XNQEREQ and XNQEREQC exits. The program demonstrates three ways of adding a SCOPE value to EXEC CICS ENQ and EXEC CICS DEQ requests, to make the requests apply to multiple regions within the sysplex.

About DFH$XNQE

The program gives the following examples:
  • Coding Exec Interface Global User Exits
  • Issuing a mixture of XPI and EXEC CICS API calls within Global User Exits
  • Three methods of adding a SCOPE value to EXEC CICS ENQ and EXEC CICS DEQ requests so that they apply to multiple regions within the sysplex

Methods A and B force a match to an installed ENQMODEL resource definition. Method C bypasses the use of ENQMODEL resource definitions even if there would have been a match.

Method A
Prefix the Resource name with a 1- to 255-character value (this sample uses a 4-character value) for the ENQNAME on the ENQMODEL resource definition to which you want to force a match. The exit terminates and processing continues as though the chosen ENQMODEL had been matched normally. The scope is then supplied by the matched ENQMODEL definition.

This method applies only to resource names shorter than 255-n (where n is the length of you chosen prefix).

Method B
Similar to method A, but you replace the first 1- to 8-characters of the resource name with your chosen string instead of prefixing it.
  • This method applies only to resource names of length equal to or greater than that of your replacement string.
  • This method is an alternative to method A when a resource name too long to allow the use of that method.
Method C
Place a 4-character Scope value in UEPSCOPE, and return UERCSCPE in R15. This will bypass any installed ENQMODEL resource definition, forcing a Sysplex Scope ENQ/DEQ request.

This method is not recommended if you have an ENQMODEL table, because the latter is designed to preserve data integrity by preventing the possibility of a region scope enqueue and a sysplex scope enqueue (or two sysplex scope enqueues with different scopes) existing for the same resource. (Because sysplex and region scope enqueues use separate namespaces, a region scope enqueue will never wait on a sysplex enqueue, nor will a sysplex scope enqueue wait on a region enqueue.)