Show an example of an application that runs a job once if any of its predecessors ended abnormally.
Objective: Setup and run a job once, only if any of its predecessors ends abnormally.
Job JOB99 has 4 predecessors: Job JOB01, JOB02, JOB03, and JOB04.
Job JOB99 runs once if any of its 4 predecessor jobs had abended or ended with a non-zero condition code.
Example:
APPL JOB
JCLLIB 'hlq.JCLLIB'
CCCHK RC(1:4095) Fail Continue
JOB JOB
RUN DAILY
RELEASE ADD(JOB99(A))
ENDJOB
JOB JOB02
RUN DAILY
RELEASE ADD(JOB99(A))
ENDJOB
JOB JOB03
RUN DAILY
RELEASE ADD(JOB99(A))
ENDJOB
JOB JOB04
RUN DAILY
RELEASE ADD(JOB99(A))
ENDJOB
JOB JOB99 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 need not be satisfied for this job to run.