Execution when dependent on other jobs in a JES3 system

Use dependent job control (DJC) when jobs must be executed in a specific order. The group of jobs that depend on each other form a dependent job control (DJC) network. To indicate to JES3 the relationship of jobs to each other in a DJC network, code a JES3 //*NET statement in each job. Jobs in a network are of two types:
Using parameters on the //*NET statement, you can make execution of a job depend on how a predecessor terminated: normally or abnormally. When a predecessor job completes, a successor job:

External Dependencies:

If your job depends on external events, you can specify a count of predecessor jobs that is one greater than needed. The system will hold the job because the count cannot reach zero. When the external event occurs, the operator can issue a *MODIFY,N command to reduce the number so that the job will execute.

Testing a Network:

To test a network without executing the programs, substitute the following for each actual EXEC statement:
  
   //stepname EXEC PGM=IEFBR14  

Example 1:

To set up a DJC network, first draw a diagram of the dependencies:
  
   JOBA  JOBB  
      |  |  
      JOBC  
      |  |  
   JOBD  JOBE  

Give the network a name: XMP1. This is the //*NET statement NETID parameter.

Then list each job and its predecessors and successors:
  
   jobname       Predecessors        Successors  
                 //*NET NHOLD        //*NET RELEASE  
  
   JOBA               0                 JOBC  
   JOBB               0                 JOBC  
   JOBC               2                 JOBD, JOBE  
   JOBD               1                 none  
   JOBE               1                 none  
Finally, code a //*NET statement to appear in each job:
  
//JOBA  JOB  ...  
//*NET  NETID=XMP1,RELEASE=(JOBC)  
//S1    EXEC ...  
         .  
         .  
//JOBB  JOB ...  
//*NET  NETID=XMP1,RELEASE=(JOBC)  
//SA    EXEC ...  
         .  
         .  
//JOBC  JOB ...  
//*NET  NETID=XMP1,NHOLD=2,RELEASE=(JOBD,JOBE)  
//S1    EXEC ...  
         .  
         .  
//JOBD  JOB ...  
//*NET  NETID=XMP1,NHOLD=1  
//SA    EXEC ...  
         .  
         .  
//JOBE  JOB ...  
//*NET  NETID=XMP1,NHOLD=1  
//S1    EXEC ...  
         .  

Example 2:

This example shows two networks. JOB3 in network XMP3 depends on JOBC in network XMP2.
  
           XMP2                  XMP3  
  
        JOBA   JOBB              JOB1  
           |   |                   |  
           JOBC      <---        JOB2  
             |          |          |  
           JOBD         --->     JOB3  
  
  
   jobname           Predecessors       Successors  
                     //*NET NHOLD       //*NET RELEASE  
  
   JOBA                   0                JOBC  
   JOBB                   0                JOBC  
   JOBC                   2                JOB3  
   JOBD                   1                none  
  
   JOB1                   0                JOB2  
   JOB2                   1                JOB3  
   JOB3                   2                none  
The //*NET statements for each job are:
  
   For JOBA:   //*NET NETID=XMP2,RELEASE=(JOBC)  
   For JOBB:   //*NET NETID=XMP2,RELEASE=(JOBC)  
   For JOBC:   //*NET NETID=XMP2,NHOLD=2,NETREL=(XMP3,JOB3),RELEASE(JOBD)  
   For JOBD:   //*NET NETID=XMP2,NHOLD=1  
   For JOB1:   //*NET NETID=XMP3,RELEASE=(JOB2)  
   For JOB2:   //*NET NETID=XMP3,NHOLD=1,RELEASE=(JOB3)  
   For JOB3:   //*NET NETID=XMP3,NHOLD=2