ESCAPE command

Used to terminate the script being processed, or all scripts, without exiting ACL.

Syntax

ESCAPE <ALL> <IF test>

Parameters

ALL

Specifies that all active scripts should be terminated.

IF test

Specifies a test that must evaluate to true before the command is executed. If the test evaluates to false the command does not run.

Remarks

You can use the ESCAPE command to halt the execution of a script or subscript based on a condition, or stop the execution of all running scripts. For example, if Script_A contains a DO Script_B command, and Script_B contains the ESCAPE command, then ACL terminates Script_B. Commands in Script_B that follow the ESCAPE command will not be executed. Instead, ACL resumes processing at the next line in Script_A after the DO Script_B command.

If Script B contains an ESCAPE ALL command, ACL stops the execution of both Script_A and Script_B.

Example

The following example counts the number of records in a table and terminates the script if the number of records is less than 100.

COUNT 
ESCAPE IF COUNT1 < 100


(C) 2013 ACL Services Ltd. All Rights Reserved. | Send feedback