Previous Topic: EVENTTYPE Statement—Specify a Windows Event TypeNext Topic: EXPIRATION Statement—Specify the Number of Days Before the Spool Request is Deleted


EXITCODE Statement—Identify Success or Failure by Exit Code

The EXITCODE statement specifies exit codes that indicate the success or failure of a job. If you do not specify the EXITCODE statement, a job is considered to have completed successfully only if a return code of zero (0) is issued.

Supported Job Types

This statement is optional for the following job types:

Syntax

This statement has the following format:

EXITCODE code [SUCCESS|FAILURE]
code

Defines a single exit code or a range of exit codes.

Limits: The maximum length is 41 characters, which allows two 20-digit exit codes plus one dash (-) between them to indicate a range. The minimum exit code value is 0 and the maximum value is 18446744073709551615.

Examples: 4, 10000000000000000000, 0-9999, 10000000000000000000-18446744073709551615

SUCCESS

(Optional) Indicates that the specified exit codes are treated as job success. This is the default.

FAILURE

(Optional) Indicates that the specified exit codes are treated as job failure.

General 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.

Use the EXITCODE statement within the boundaries of a job definition to apply to a single job or outside the boundaries of the job definition to apply to the entire application.

Example: Define Multiple EXITCODE Statements

In this example, EXITCODE specifies the following conditions: