Enqueuing and Locks

Some JES3 resources (such as the FCT chain) must be accessed by only one DSP at a time. To protect against concurrent use of such resources, JES3 provides an enqueuing method that uses the ATEST, AENQ, and ADEQ macros. The IATYRSC macro defines the resources manipulated by these instructions.

These macro instructions are used to access JES3 resources as follows:
  • AENQ obtains use of the named resource.
  • ADEQ releases control of the named resources.
  • ATEST tests the availability of the resource.

For an explanation of the use of locks in a z/OS® system, see z/OS MVS Programming: Authorized Assembler Services Guide. For a description of the locks used by JES3, see z/OS JES3 Diagnosis.

The following example illustrates the use of the ATEST, AENQ, and ADEQ macros. See Introduction for more information on these macros.

ATEST NAME=JNCBCTL,TYPE=FCT,ERROR=RNTERROR
LTR   R1,R1
BC    NZERO,INUSE
AENQ  NAME=JNCBCTL,BUSY=WAIT
.
.
.
ADEQ  NAME=JNCBCTL