How to define what agent jobs return codes are good or bad
search cancel

How to define what agent jobs return codes are good or bad

book

Article ID: 43969

calendar_today

Updated On:

Products

CA 7 Workload Automation

Issue/Introduction

How do I define what return codes for agent jobs are success or failure (good or bad)?

Resolution

When you define agent jobs, there is not COND CODE / RO field on the AGJOB definition screen. You must code the EXITCODE keyword in the clang statement that reside in the PARMLIB. The EXITCODE allows you to define what return codes you would like to be success or failure.  

Example:

The scenario below defines 0 thru 9999 as success with the exception of RC=5, also any return code over 10000 is a failure

EXITCODE 5 FAILURE

EXITCODE 0-9999 SUCCESS

EXITCODE 10000-18446744073709551615 FAILURE

 

Useful notes: 

Use the EXITCODE statement to indicate an exit code other than 0 or a range of codes as job success.

You can specify multiple exit codes using multiple EXITCODE statements. There is no limit to the number of EXITCODE statements that you can use.

If you specify multiple exit codes, enter the most specific codes first followed by the ranges.