:EXIT
Script 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. |
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
Warning! :EXIT terminates script processing. Do not use this script element in Post Process pages. Use :MODIFY_STATE instead.
Example
The following example ends script processing with the return code 10.
:EXIT 10
See also: