:EXIT

ScriptEigener Objekttyp in der Automation Engine Statement: Terminates the processing of a script and sends a return code.

Syntax

:EXIT [Return code]

Syntax

Description/Format

Return code

Value that should be used as the return code.
Format: number, script variable or script function.
Default value: "0"

Comment

You can use this script statement in order 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 a variable's content in a Script object and depending on the content, you can either continue or cancel the task.

If you use this script statement without a return code or with the value 0, script processing ends normally with the return code 0. The task itself continues (this means that jobs start with the generated JCL, notifications are displayed etc).

You can also define user return codes as return codes. Script processing is canceled and the task ends abnormally  (ENDED_NOT_OK). If the option generate at runtime is activated in the task's Attributes tab, you can react to this user return code within a workflow. 

:EXIT terminates script processing. Therefore, you cannot use this script element in Post Process tabs. Automic recommends using the script statement :MODIFY_STATE in such a case.

Example

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

:EXIT 10

See also:

Script element Description

:MODIFY_STATE

Modifies the return code or status text of a job after it has ended.

:STOP

Cancels script processing.

Script Elements - Error Handling and Messages

System Return Codes of Executable Objects

About Scripts
Script Elements - Alphabetical Listing

Script Elements - Ordered by Function