Previous Topic

Next Topic

Book Contents

Book Index

Extracting Information From a Multi-line Message

The example in Figure 109 demonstrates extraction of information from a multi-line message using System variables set during multi-line message processing. SHOUT statements are used to display information about the multi-line message that triggered the rule.

Figure 109 Example of Extracting Information from a Multi-Line Message

ON MESSAGE  = IEA995I

   JNAME CICS*    JTYPE J       SMFID        SYSTEM

   ROUTE          DESC          CONSOLEID    CONSOLE

   APPEARED       TIMES IN      MINUTES                        And/Or/Not

OWNER IOAADMIN GROUP                         MODE PROD    RUNTSEC

THRESHOLD

DESCRIPTION GETTING INFORMATION FROM A MULTI-LINE MESSAGE

DESCRIPTION Z/OS ABEND - SYMPTOM DUMP OUTPUT MESSAGE

===========================================================================

/* ALL STATEMENTS PRECEEDING THE 'ENDMSG' ARE EXECUTED FOR EACH LINE

DO SHOUT    = TO OPER              URGENCY R SYSTEM           CTO282I

   MESSAGE PROCESSING LINE NUMBER %%$LINES

DO SHOUT    = TO OPER              URGENCY R SYSTEM           CTO282I

   MESSAGE THE LINE BEING PROCESSED IS %%$M*

DO SHOUT    = TO OPER              URGENCY R SYSTEM           CTO282I

   MESSAGE THE FIRST WORD OF THE LINE BEING PROCESSED IS %%$W1 %%$M*

ENDMSG

/* ALL STATEMENTS AFTER THE 'ENDMSG' ARE EXECUTED AFTER ALL THE LINES

/* OF THE MULTI-LINE MESSAGE ARE PROCESSED

DO SHOUT    = TO OPER              URGENCY R SYSTEM           CTO282I

   MESSAGE ALL THE LINES OF THE MESSAGE HAVE BEEN RECEIVED

DO SHOUT    = TO OPER              URGENCY R SYSTEM           CTO282I

   MESSAGE THE TOTAL NUMBER OF SECONDARY LINES IS %%$LINES

DO SHOUT    = TO OPER              URGENCY R SYSTEM           CTO282I

   MESSAGE THE MAJOR LINE IS %%$M0

DO SHOUT    = TO OPER              URGENCY R SYSTEM           CTO282I

   MESSAGE THE FIRST WORD OF THE MAJOR LINE IS %%$W1 %%$M0

DO SHOUT    = TO OPER              URGENCY R SYSTEM           CTO282I

   MESSAGE THE FIRST SECONDARY LINE IS %%$M1

FILL IN RULE DEFINITION. CMDS: EDIT, SCHED, OPT, SHPF              17.02.57

Explanation

It is unlikely that you would need to specify the number of SHOUT statements included in this rule. This rule is designed for demonstration purposes. Each SHOUT statement in this rule conveys different information about the multi-line message that triggered the rule.

Statements (in this case SHOUT statements) appearing before the ENDMSG parameter are performed for each line of the multi-line message. Statements appearing after (below) the ENDMSG parameter are performed only once, after all lines of the message have been processed.

System variables are used in this rule to refer to different parts of the message text (for example, %%W1 %%$M0), and to the position of a given line in the message (%%$LINES). For more information on the different System variables see System Variables.

Parent Topic

Working With Control-O Rules