By default, an exit code of zero (0) is interpreted as job success and any other number indicates job failure. However, you can map exit codes other than 0 as job success.
To send a user-defined exit code, specify the EXITCODE statement in the job definition.
Example: Send a User-Defined Exit Code
The following example shows the first and last lines of the payroll.sh script. The script returns the self-defined exit code 100 to the scheduling manager.
#!/usr/bin/sh . . . exit 100
The following example shows the definition of the job that runs the script. In this job, the EXITCODE statement defines exit code 100 as SUCCESS, indicating successful completion of the script.
AGENT SUN_NY SCRIPTNAME /home/esp/payroll.sh EXITCODE 100 SUCCESS EXITCODE 0 SUCCESS
|
Copyright © 2013 CA Technologies.
All rights reserved.
|
|