:EXIT

Use the :EXIT script statement to stop the processing of a script with a specified return code. In doing so, you can react to conditions that cause the task to be canceled. For example, you can test the content of a variable in a Script object and depending on the content, you can either continue or cancel the task.

Important! Do not use this script element in Post Process pages because :EXIT terminates script processing. Use :MODIFY_STATE instead.

Syntax

:EXIT[Return code]

Parameters

  • :EXIT
    Terminates the processing of a script and to send a return code.

  • Return code
    (Optional) Value that should be used as the return code. If you use the :EXIT script statement without this parameter, or with the value 0, script processing ends normally with the return code 0. The task itself continues which includes that jobs start with the generated JCL, and notifications are displayed, etc. You can define user return codes as return codes (see User Return Codes of Executable Objects). In this case, script processing is canceled, and the task ends abnormally  (ENDED_NOT_OK). If the option Generate Task at: Runtime is activated in the Attributes page of the task, you can react to this user return code within a workflow. 
    Format: number, script variable or script function
    Default value: 0

    • Example

      The following example ends script processing with the return code 10.

      :EXIT 10

See also: