Two jobs are part of the same application: JOB1 & JOB2.
JOB1 runs immediately after load of application APPL.
JOB2 runs much later in the day.
The requirement is that JOB1 should run only if JOB2 (in the previous generation of the APPL has completed fine).
If JOB2 in the previous generation of the APPL has not completed fine, then JOB1 of current generation should wait for it.
ESP Workload Automation 12.0 - z/OS supported releases -
You can create a Global Variable to throttle a variable to allow jobs to run or not depending if the variable is on. See the following article:
Need to prevent 2 jobs in one application from running when another application is running.
Next if you want to have one generation to complete before the next one can run the can add a WAIT on the APPL statement:
APPL Statement: Identify and Set Applications
You could also put wait on a subappl level if you want the rest of the application to run jobs and just hold the subappl from the next generation from running.
You could also use resources to control if a job can run or not.