TPX Session Management for z/OS

 View Only
  • 1.  Avoid endless loops in ACL

    Posted Nov 09, 2017 08:10 AM

    When writing programs, there is a likelihood to create endless loops. ACL/E is no exception here.
    Likely you know that you can use Statement

    OPTION  MAXI,nnnn

    to restrict the total number of statements. After nnnn statements the ACL ends.

     

    But there is also another way to prevent loops. This works by setting parameter "ACL Runaway Limit" in the first panel of SMRT. The default value is 10000 and is the initial value of a counter. That counter is decreased by one for each Statement processed in an ACL which does not require external intervention like ADD, SUB, KEY, SEARCH, BRANCH, TABF. If a statement that requires external intervention is processed - like INPUT, PAUSE, SEND, WINP - that counter is set back to the initial value. Should the counter reach zero the ACL stops with  Error message

    SCRIPT TERMINATED DUE TO RUNAWAY CONDITION 



  • 2.  Re: Avoid endless loops in ACL

    Posted Dec 28, 2017 07:48 AM

    If your ACL is looping you can create a trace by using

    OPTION  FLOW,ON

    at the start of the ACL. This Option writes every executed line into the TPXLOG. This information should help you debugging the loop.



  • 3.  Re: Avoid endless loops in ACL

    Posted Jan 24, 2018 02:33 AM

    Here you find some examples for which purposes ACL/E programs can be used: https://docops.ca.com/ca-tpx-session-management/5-4/en/programming/acl-e-programming/sample-programs