How to release a successor based on an Agent job's EXITCODE
search cancel

How to release a successor based on an Agent job's EXITCODE

book

Article ID: 210130

calendar_today

Updated On:

Products

ESP Workload Automation

Issue/Introduction

Agent jobs: How to release a successor based on an Agent job's EXITCODE? 

Environment

Release : All

Component : ESP WORKLOAD AUTOMATION

Resolution

Use the COND(RC(rc)) option on the RELEASE statement.

Example:

LINUX_JOB JOB1                                 
  AGENT LINUX01                                  
  SCRIPTNAME /example/sleep.sh 
  args 5 8                                     
  RUN WEEKDAYS                                 
  EXITCODE 8 SUCCESS                           
   RELEASE ADD(JOB2) COND(RC(8))               
ENDJOB                                         
                                               
LINUX_JOB JOB2                                 
  AGENT LINUX01                                  
  SCRIPTNAME /example/sleep.sh 
  args 5 0                                     
  RUN WEEKDAYS                                 
ENDJOB    

Explanation: Run JOB2 if JOB1's exitcode = 8. 

Additional Information

Release statement: 

https://techdocs.broadcom.com/us/en/ca-mainframe-software/automation/ca-workload-automation-esp-edition/12-0/reference/statements/release-statement-identify-successors.html