TPX Session Management for z/OS

 View Only

Tuesday Tip: TPX: Do you know about Accumulators in ACL?

  • 1.  Tuesday Tip: TPX: Do you know about Accumulators in ACL?

    Posted Sep 03, 2014 03:25 AM

    ACL, the script language of TPX, provides four predefined numeric variables called Accumulators. The names of these variables are A1, A2, A3 and A4.
    Accumulators are mainly used for loop counters and basic mathematical expressions.

    They have the following features:

    • The scope of the Accumulator is limited to the ACL in which they are used. There is no need to define them using a VDEFINE Statement. Valid values in Accumulators are any integers between 0 and 16777215 (=2^24-1).
    • When used in COMPARE, ADD or SUB, the value of an accumulator is referenced without the '&' otherwise it is interpreted as an implicit defined variable.
    • When the value of an accumulator is displayed, the accumulator need to be prefixed by an '&' like every other variable:
      OUTPUT 'The Value of A1 = &A1',7/6
    • Take care that the value in the accumulator does not go negative. Otherwise results are unpredictable.


    • Here are the possible functions which can be executed using accumulators (An stands for A1, A2, A3 or A4, respectively):


       SET      An,integer
       ADD      An,An
       ADD      An,integer
       SUB      An,An
       SUB     An,integer
       COMPARE  An,An
       COMPARE An,integer