IBM Support

UA67469 AOTXT Capture more than 999 lines of MLWTO text

Fix Readme


Abstract

PTF UA67469 provides the ability to capture more than 999 lines of a trapped multi-line WTO. The text lines can be put into REXX variables to be used in automation applications.

Content

When a WTO Is trapped, the text of that message is stored into the AF/Operator supplied match variable, AOTEXT. For multi-line messages (MLWTOs), the text of each line of the message is stored in AF/Operator Global match variables AOTXT1 through AOTXT999.

The maximum number of MLWTO text lines that can be captured is thus 999.

Likewise, the AOWTXn Global match variables represent the lines of an MLWTO trapped as the result of a WAIT WTO() command.

In order to extend that limit, a new REXX function called GETMLWTO has been created and will set REXX stem variables called either 'AOTXT.n' or 'AOWTX.n' by default. The 'AOTXT.0' or 'AOWTX.0' variable will contain the count of how many variables exist in the series.



The maximum number of supplied line variables is 3000 ('AOTXT.3000' and 'AOWTX.3000').

SYNTAX: RC=GETMLWTO('AOTXT' or 'AOWTX')

Where the argument can be:
    AOTXT - Lines of the multi-line WTO that triggered a WTO TRAP are set into the
    compound variables.

    AOWTX - Lines of the multi-line WTO that resumed a match from a WAIT WTO
    command are set into the compound variables.

RETURN CODES:
    0 = Success.
    4 = No multi-line WTO text available.
    other = internal error

RESULT VARIABLES: When the return code indicates success, the function returns text lines from the multi-line WTO in the following REXX compound variables:
    AOTXT.0 - The number of suffixed variables returned.
    AOTXT.n - The lines of text from the multi-line WTO, where n can be 1 through AOTXT.0
    AOWTX.0 - The number of suffixed variables returned.
    AOWTX.n - The lines of text from the multi-line WTO, where n can be 1 through AOWTX.0

The REDIRECT REXX function may be used to adjust the name of the variables produced by the GETMLWTO function.

Example of using the GETMLWTO REXX function:
      rc = GETMLWTO('AOTXT')
      IF rc = 0 THEN DO
        SAY 'AOTXT.0' AOTXT.0
        DO i = 1 TO AOTXT.0
          SAY 'AOTXT.'i AOTXT.i
        END
      END

In addition, New AF/Operator GLOBAL variables have been added.

The following are only available in a match created when a multi-line WTO has been trapped:
    AOTXTMAX - Integer, read only variable containing the number of lines of multi-line WTO text that were captured.

    AOTXnnnn - Character, read only variable containing a line of text from a multi-line WTO. Where, nnnn is a 4-digit sequence number (starting at 1000).

The following are only available after a match using WAIT WTO was resumed by a multi-line WTO being trapped.
    AOWTXMAX - Integer, read only variable containing the number of lines of multi-line WTO text that were captured.

    AOWTnnnn - Character, read only variable containing a line of text from a multi-line WTO. Where, nnnn is a 4-digit sequence number (starting at 1000).

NOTE: The AOTXnnnn and AOWTnnnn global variables can be retrieved using the GLBVGET REXX function. However, they do not appear in the output from a SHOW VARS command.

For backwards compatibility the global variables named 'AOTXT#' and 'AOWTX#' will never contain a value that exceeds 999.

Although awkward, it is possible to spin through AOTXTnnn and AOTXnnnn variables in one DO loop, for example:
    rc = GLBVGET('AOTXTMAX')
    DO i = 1 TO AOTXTMAX
      NAME = STRIP(LEFT('AOTXT',8-LENGTH(i)))i
      rc = GLBVGET(NAME)
      tmp = VALUE(NAME)
    END

[{"Product":{"code":"SSRJ25","label":"Tivoli OMEGACENTER Gateway on z\/OS"},"Business Unit":{"code":"BU058","label":"IBM Infrastructure w\/TPS"},"Component":"--","Platform":[{"code":"PF035","label":"z\/OS"}],"Version":"3.4","Edition":"","Line of Business":{"code":"LOB35","label":"Mainframe SW"}},{"Product":{"code":"SSRMRD","label":"Tivoli AF\/OPERATOR on z\/OS"},"Business Unit":{"code":"BU054","label":"Systems w\/TPS"},"Component":" ","Platform":[{"code":"PF035","label":"z\/OS"}],"Version":"3.4","Edition":"","Line of Business":{"code":"LOB35","label":"Mainframe SW"}}]

Document Information

Modified date:
03 August 2018

UID

swg21640326