How avoid endless loops in ACL?
search cancel

How avoid endless loops in ACL?

book

Article ID: 10628

calendar_today

Updated On:

Products

TPX - Session Management Vman Session Management for z/OS

Issue/Introduction

In programming the likelihood of creating unwanted endless loops is high, especially during creation and test of a program. In ACL there are two ways to avoid these CPU-consuming loops.



Environment

Release: NVINAM00200-5.4-TPX-Session Management-Access Management package
Component:

Resolution

Here are the two ways to avoid endless loops in ACL programs:

1. Restrict the total number of statements

With Statement

  OPTION MAXI,nnnn

you restrict the number of statements executed in the ACL to the number specified after "MAXI". When you specify
  OPTION MAXI,0

there is no limit.

2. Set a Runaway Limit

Beside the MAXI-Option there is another way to avoid ACLs in uncontrolled loops can be influenced by parameter "ACL Runaway Limit" in the first panel of the SMRT.

<Please see attached file for image>

src="/servlet/servlet.FileDownload?file=0150c000004AJdIAAW" alt="smrt-1.png" width="668" height="395">

The default of this parameter is 10000 and can be changed to a value between 200 and 20000. What does this number mean?
With this number you specify the maximum value a "counter for the runaway statement limit" can reach. For each ACL statement that does not need external intervention this counter is increased by one. Those statements are for example ADD, SUB, KEY, SEARCH, BRANCH, TABF, TABB, HOME, UDEFINE, VDEFINE. They all do not need intervention by the user or wait on data streams from the application. When such a statement has finished the next one is executed. But when a statement which hands over control to the user, the terminal or the application then the counter is set back to zero. Examples of those statements are ENTER, PF, PA, INPUT, PAUSE, SEND, WINP. This picture shows the values of the counter for a typical ACL. The counter is increases as long as ACL statements are executed which need no intervention. The first statement which need intervention, here it is WINP which waits for input from the application, reset the counter to zero.

<Please see attached file for image>

src="/servlet/servlet.FileDownload?file=0150c000004AJdGAAW" alt="acl.png" width="488" height="286">

If the Runaway Limit is reached, the ACL ends with this message

<Please see attached file for image>

src="/servlet/servlet.FileDownload?file=0150c000004AJdHAAW" alt="fehlermeldung.png" width="597" height="305">

Attachments

1558702112212000010628_sktwi1f5rjvs16ppv.png get_app
1558702110280000010628_sktwi1f5rjvs16ppu.png get_app
1558702108383000010628_sktwi1f5rjvs16ppt.png get_app