How to get information about TPX variables like type, length etc. from within an ACL program?

Document ID:  TEC475104
Last Modified Date:  06/06/2017
{{active ? 'Hide' : 'Show'}} Technical Document Details

Products

  • CA TPX Session Management for z/OS
  • CA STX Session Management for z/OS
  • CA Teleview Session Management for z/OS
  • CA Vman Session Management for z/OS

Releases

  • CA TPX Session Management for z/OS:Release:5.1
  • CA TPX Session Management for z/OS:Release:5.2
  • CA TPX Session Management for z/OS:Release:5.3
  • CA TPX Session Management for z/OS:Release:5.4

Components

  • CA-TPX for OS/390:TPX
Introduction:

Sometimes you need information about a variable beside the content of that variable. You want to know the length of the data inside the variable or the Data Type. There are some functions in ACL/E which were created for that purpose.

Instructions:

To get information about variables you can use three predefined function variables:

&MSIZE_OF(...)

Example:

    VDEFINE    VAR,8
    SET        VAR,'HELLO'
    SET        M,&MSIZE_OF(&VAR)

Variable &M will contain 8, the maximum possible length of variable &VAR, as defined in the VDEFINE statement.

&SIZE_OF(...)

Example:

    VDEFINE    VAR,10
    SET        VAR,'HELLO'
    SET        S,&SIZE_OF(&VAR)

Variable &S will contain 5, the length of the value currently kept in variable &VAR

&TYPE_OF(...)

Note: The variable name must be entered without '&'.

Possible values are:

ARRAY             Indicates that this is an array variable
BIN               Indicates that this is a binary variable.
CHAR              Indicates that this is a character variable.
UPCHAR            Indicates that this is an uppercase character variable.
HEX               Indicates that this is a hexadecimal variable.
NOTRUNC           Indicates that the variable will not be stripped of trailing blanks when substitution takes place.
NUM               Indicates that this is a numeric variable.
UNDEFINED         Indicates that this variable is not defined.
This value can be attached to the ones above:
ACL               Indicates that the variable was defined in ACL/E

Example:

    VDEFINE    VAR,8,TYPE=CHAR
    SET        VAR,'HELLO'
    SET        T,&SIZE_OF(VAR)  <--- without '&' 

Variable &T will contain string 'CHAR ACL'.

Please help us improve!

Will this information enable you to resolve your issue?

Please tell us what we can do better.

{{feedbackText.length ? feedbackText.length : '0'}}/255

{{status}}

Not what you were looking for?

Search Again >

Product Information

Support by Product >

Communities

Join a Community >