JCL Submission

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:
  1. When a JCL is submitted, the request is written to the casspool file. This casspool is common to all Enterprise Server Cluster members.
  2. 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.
  3. 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.
  4. The GLM checks if an ENQ for this JOBNAME already exists and response to the client with an appropriate return code.
  5. The Enterprise Server Cluster client CAS Manager returns the GLM response to the JOB Manager.
  6. If the return code permits execution, the batch initiator is dispatched to execute the JCL.
In the batch initiator:
  1. The job starts in the Job initiator.
  2. The JOB Manager requests an ENQ on SYSZJOBN JOBNAME. SYSZJOBN ENQ requests are always global and are therefore sent to the GLM.
  3. JES requests DEQ on SYSZJOBD JOBNAME. The DEQ is global, and therefore the request is sent to the GLM.
  4. JES requests locks for all SYSZDSN resources.
  5. RNLs are used to determine the resource's scope: SERVER/LOCAL or SERVERS/GLOBAL.
  6. 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.
  7. At the end of the job, JES requests the DEQ of all SYSZDSNs previously ENQueued.
  8. Global DEQs are shipped to the GLM, all SYSZDSNs are DEQueued locally.
  9. 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.