Description:
Based on the following set up:
If Job1 and Job2 are set up to be mutually exclusive with the ESP code:
JOB JOB1 RUN ANYDAY NOTWITH JOB2 ENDJOB JOB JOB2 RUN ANYDAY NOTWITH JOB1 ENDJOB
If JOB2 abends will that stop Job1 from taking off as long as Job2 is in abend status in the queue?
Solution:
No, the HOLD operand is needed with the NOTWITH statement as follows:
JOB JOB1 RUN ANYDAY NOTWITH JOB2 ENDJOB JOB JOB2 RUN ANYDAY NOTWITH JOB1 HOLD ENDJOB
The HOLD operand causes job JOB2 to hold onto any resources it was using. This keeps job JOB1 from running until job JOB2 is forced complete, restarted successfully or rerun successfully.