Dependent job control (DJC)

Dependent job control (DJC) is a JES3 function that manages jobs that are dependent upon one another. For example, job A produces output on tape that job B requires as input, and job B produces output on tape that job C requires as input. DJC enables such jobs to be processed in a specific order, as determined by their job dependencies. Job dependencies can occur because of data dependencies, or can be defined to achieve better device utilization, or to manage production job streams.

In DJC, jobs are categorized as “predecessor” or “successor” jobs by their relationships to each other. A predecessor job is a job that must complete processing before another job can be scheduled; jobs that must wait for the completion of one or more predecessor jobs are called successor jobs.

Job dependencies of a complex nature are typical. As an example, DJC manages the scheduling of the complex DJC network illustrated in Figure 1.

Figure 1. Complex DJC Network
The diagram shows an example of how DJC manages the scheduling of the complex DJC network.

The DJC network name is defined to JES3 on the //*NET control statement. Each DJC network in the JES3 job queue has a name that is similar to a job name for a single job in the job stream. (Nonstandard DJC jobs are defined with //*PROCESS DJCPROC or DJC statements.) The NET statement identifies the DJC network to which the job belongs and specifies the dependency that must be satisfied before the job can be scheduled.

The first job of a given DJC network entering the system causes the specified network to be defined to JES3. All subsequent jobs with the same DJC network identification become members of the DJC network. You can use the *INQUIRY,N command to display the status of the DJC networks currently in the job queue.

The first job of a particular DJC network uses the DEVPOOL parameter of the //*NET control statement to reserve devices for the DJC network. The devices are reserved when this job enters setup. It is important for the programmer or operator to reserve devices for a job network if, as is typically the case, the DJC jobs pass data sets from one to another; this means that they have similar setup requirements (the same volumes and devices are needed by many of the jobs). If devices are not reserved for a DJC network, the DJC jobs contend with other jobs for the available devices when they enter setup. Because DJC jobs are normally held before setup and they are only released for setup when their predecessors have completed, other jobs can take over the devices that the DJC network will soon need again. Volume mounting operations and the time that successor jobs require to get through the system can both be reduced by reserving the commonly-required devices for the DJC network.

The NHOLD parameter on the //*NET statement specifies the number of predecessor jobs that must complete before the job is eligible for scheduling. If the NHOLD parameter is not specified, the job is eligible for immediate scheduling. If the NHOLD parameter is specified or if the job is in an operator-hold state, only the first phase of the interpreter function is scheduled; further scheduling is suspended until all the job's predecessors complete processing. You can use the *INQUIRY,N,ID= command to display the status of jobs in a DJC network.

When a DJC job completes, it reduces by one the NHOLD count of any successor jobs. However, specifying the release scheduling count (RELSCHCT parameter on the //*NET control statement) allows the job to be released before the NHOLD count has reached zero. In this case, the job is scheduled up to, but not including, main service, and then it is placed in DJC hold status in the job queue. When the NHOLD count reaches zero, JES3 releases the job for main scheduling. A job released by the RELSCHCT parameter has its devices set up early. When its predecessors have completed, it is ready for main (execution) scheduling.

The display dependent job control tables utility (DISPDJC) can be used to give a report on the status of a DJC network. (See z/OS JES3 Diagnosis.)

Normally, commands are not required to invoke DJC; however, the *INQUIRY and *MODIFY commands can display and alter DJC specifications.

See z/OS MVS JCL Reference for information on how to code DJC network statements.

Note: Jobs belonging to a dependent job control (DJC) network cannot be registered with automatic restart management.