Previous Topic: ExamplesNext Topic: Make an ACL/E Program Memory Resident


Set a Runaway Limit

Uncontrolled loops are also prevented by the runaway limit specified in CA TPX Administration. The runaway limit is an additional safeguard against uncontrolled loops, and cannot be disabled or changed by an ACL/E statement such as OPTION MAXI.

Certain ACL/E commands relinquish control of the program to the user, terminal, or application. Examples of commands that relinquish control are ENTER, PF, PA, INPUT, SEND, PAUSE, WAIT, and SUSPEND. Other ACL/E commands, such as ADD, KEY, TABF, and VDEFINE, do not relinquish control because they do not require any action from the user, terminal, or application.

An OPTION MAXI sets the total number of ACL/E statements that CA TPX will process before terminating the ACL/E program. A counter is updated each time a CA TPX executes a statement. When the counter reaches the specified value, the program terminates. The counter is updated regardless of whether the statement relinquishes control of the program.

The runaway limit, however, is the number of consecutive non-relinquishing statements that CA TPX will process before terminating the program. The counter for the runaway statement limit is updated each time a non-relinquishing ACL/E statement executes, and is reset to zero whenever an ACL/E statement that relinquishes control executes. If the value of this counter reaches the runaway limit, this product terminates the ACL/E program and writes the following message to the Log (if OPTION FLOW,ON is specified):

RUNAWAY CONDITION OCCURRED