:EXIT

Use the :EXIT script statement to stop script processing and return a specified return code. This lets you react to conditions that require the task to be canceled — for example, you can test the content of a variable in a Script object and either continue or cancel the task based on that content.

Important! Do not use :EXIT in Post Process pages, as it terminates script processing. Use :MODIFY_STATE instead.

Syntax

: EXIT [Return code]

Parameters

Parameter Description Format Default Value
Return code
(Optional)

Value to use as the return code. If omitted or set to 0, script processing ends normally with return code 0 and the task continues — jobs start with the generated JCL, notifications are displayed, and so on.

If a user return code is specified (see User Return Codes of Executable Objects), script processing is canceled and the task ends abnormally (ENDED_NOT_OK). If the Generate Task at: Runtime option is enabled on the Attributes page, you can react to this user return code within a workflow.

Number, script variable, or script function 0

Examples

The following example ends script processing with return code 10.

: EXIT 10

See also: