Enterprise Server uses the equivalent of the assembler macros ENQ and DEQ. These macros provide an enqueue mechanism to serialize access to a named resource across a specified set of Enterprise Server Cluster clients in the cluster. The named resource is defined by its QNAME (major name), RNAME (minor name) and SCOPE (server or servers).
In the Enterprise Server Cluster context, global ENQs are made on three queue names only:
- SYSZJOBD: Job dispatch (scope is always SERVERS/GLOBAL)
- SYSZJOBN: Jobname (scope is always SERVERS/GLOBAL)
- SYSZDSN: Dataset (scope is defined by RNLs SERVERS/GLOBAL or SERVER/LOCAL)
- JCL Submission Flow in an Enterprise Server Client
- In CAS manager:
- When a JCL is submitted, the request is written to the
casspool file. This
casspool is common to all Enterprise Server Cluster members.
- Each Enterprise Server Cluster client that has one or more initiators available for work periodically calls the Job Manager to get work for an initiator for a specific class or set of classes.
- JES calls the CAS manager back to check if there is already an ENQ on SYSZJOBD for this JOBNAME. ENQs on SYSZJOBD are always global and are therefore shipped to the GLM.
- The GLM checks if an ENQ for this JOBNAME already exists and response to the client with an appropriate return code.
- The Enterprise Server Cluster client CAS Manager returns the GLM response to the JOB Manager.
- If the return code permits execution, the batch initiator is dispatched to execute the JCL.
- In the batch initiator:
- The job starts in the Job initiator.
- The JOB Manager requests an ENQ on SYSZJOBN
JOBNAME. SYSZJOBN ENQ requests are always global and are therefore sent to the GLM.
- JES requests DEQ on SYSZJOBD
JOBNAME. The DEQ is global, and therefore the request is sent to the GLM.
- JES requests locks for all SYSZDSN resources.
- RNLs are used to determine the resource's scope: SERVER/LOCAL or SERVERS/GLOBAL.
- If their scope is global, the SYSZDSN requests are sent to the GLM, all resources are locked locally. This means that each Enterprise Server Cluster client has a copy of its local - and more importantly - global locks.
- At the end of the job, JES requests the DEQ of all SYSZDSNs previously ENQueued.
- Global DEQs are shipped to the GLM, all SYSZDSNs are DEQueued locally.
- At the end of the job, SYSZJOBN
JOBNAME is DEQueued.
Note: casbat is in a
wait for response state until the reply comes back from the GLM.