With CA Workload Automation ESP Edition, JOB1 and JOB2 are mutually exclusive by NOTWITH settings. How do you stop JOB1 from taking off when JOB2 is in abend status?
search cancel

With CA Workload Automation ESP Edition, JOB1 and JOB2 are mutually exclusive by NOTWITH settings. How do you stop JOB1 from taking off when JOB2 is in abend status?

book

Article ID: 50048

calendar_today

Updated On:

Products

ESP Workload Automation

Issue/Introduction

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.

Environment

Release:
Component: ESPWA