How to define a job to run only once and only if any of its predecessors ended abnormally.
search cancel

How to define a job to run only once and only if any of its predecessors ended abnormally.

book

Article ID: 29479

calendar_today

Updated On:

Products

ESP Workload Automation

Issue/Introduction

Solution:

   Objective: Job CYBER99 has 4 predecessors: job CYBER01, CYBER02, CYBER03, and CYBER04.  

   Job CYBER99 runs once, and only if any of its 4 predecessor jobs had abended or ended with a non-zero condition code.   

Here's a sample application:

APPL CYBER

JCLLIB 'CYBER.JCLLIB'

CCCHK RC(1:4095) Fail Continue

 

JOB CYBER01

  RUN DAILY

  RELEASE ADD(CYBER99(A))

ENDJOB

 

JOB CYBER02

 RUN DAILY

 RELEASE ADD(CYBER99(A))

ENDJOB

 

JOB CYBER03

 RUN DAILY

 RELEASE ADD(CYBER99(A))

ENDJOB

 

JOB CYBER04

 RUN DAILY

 RELEASE ADD(CYBER99(A))

ENDJOB

 

JOB CYBER99 CONDITIONAL   =>  This job is bypassed if not executed  

 RUN DAILY

 RELCOUNT 3                         =>  This job runs after one predecessor is satisfied.  It does not wait for all 4 predecessors.

ENDJOB

 

Note: RELCOUNT represents the number of predecessors that does not have to be satisfied for this job to run.

 

Environment

Release: ENCWLA00200-11.3-Workload Automation-Restart Option-EE
Component: