Previous Topic: Lesson 6: Solve a Problem Using EasyRuleNext Topic: Create a Rule to Suppress Messages


Create a Rule to Tailor the Display of Messages

To practice using EasyRule, access OPSVIEW and follow this lesson that shows you have to create a rule that tailors the display of messages.

Follow these steps:

  1. Access the EasyRule Primary panel. You begin at the OPSVIEW Primary Options Menu.
  2. Enter 2.3 into the Option field.

    The EasyRule Primary panel appears, such as the following example:

    EasyRule --------------- MSI1 --- O P S V I E W --------------- Subsystem OPSS Command ===> EEEEE AAAA SSSSS YY YY RRRRR UU UU LL EEEEE EE AA AA SS YYYY RR R UU UU LL EE EEEE AAAAAA SSSSS YY RRRRR UU UU LL EEEE EE AA AA SS YY RR RR UU UU LL EE EEEEE AA AA SSSSS YY RR RR UUUU LLLLL EEEEE ISPF LIBRARY: PROJECT ===> GROUP ===> TYPE ===> MEMBER ===> OTHER PARTITIONED DATA SET: DATA SET NAME ===> Do You Wish To AUTOMATICALLY step thru EasyRule? ===> N (Y/N)

  3. Specify a data set and member for the first rule.

    Before you can create the first rule, you must tell EasyRule the name of the rule set that you want to contain the rule. Use the Project, Group, and Type fields of the EasyRule Primary panel to do so. You must also specify a new member name in the Member field. Each member of a rule set contains a single rule, thus the name of the member is the name of the rule. To follow along with this example, specify these values on the EasyRule Primary panel:

    Your panel appears as the following example:

    EasyRule --------------- MSI1 --- O P S V I E W ------------- Subsystem OPSS Command ===> EEEEE AAAA SSSSS YY YY RRRRR UU UU LL EEEEE EE AA AA SS YYYY RR R UU UU LL EE EEEE AAAAAA SSSSS YY RRRRR UU UU LL EEEE EE AA AA SS YY RR RR UU UU LL EE EEEEE AA AA SSSSS YY RR RR UUUU LLLLL EEEEE ISPF LIBRARY: PROJECT ===> SYS1.OPS GROUP ===> TEST TYPE ===> RULES MEMBER ===> NOTCTLG OTHER PARTITIONED DATA SET: DATA SET NAME ===> Do You Wish To AUTOMATICALLY step thru EasyRule? ===> N (Y/N)

    After you type in the suggested field values and press Enter, the Rule Type Selection panel appears, a sample of which is shown next.

  4. Select the type of rule you want to create by entering its code in the Option field of the Rule Type Selection panel.

    To follow along with this example, enter 1 to create a message rule:

    EasyRule --------------------------------------------------------------------- Option ===> 1 R U L E T Y P E S E L E C T I O N 1 MSG - Create Message Event Rule 2 CMD - Create Command Event Rule 3 GLV - Create Global Variable Event Rule 4 TOD - Create Time-Of-Day Event Rule 5 OMG - Create OMEGAMON Event Rule 6 DOM - Create Delete-Operator-Message Event Rule 7 EOJ - Create End-Of-Job Event Rule 8 EOM - Create End-Of-Memory Event Rule 9 EOS - Create End-Of-Step Event Rule 10 TLM - Create Time-Limit-Exceeded Event Rule 11 USS - Create UNIX System Services (USS) Message Event Rule Press END to return

    EasyRule provides a main menu for each type of rule. Since you selected option 1 on the Rule Type Selection panel to create a message rule, the Message Rule Main Menu appears next. A sample follows.

  5. Select option 1 MESSAGE ID from the Message Rule Main Menu.

    Notice that the following example specified the 1 option:

    EasyRule --------------------------------------------------------------------- Option ===> 1 M E S S A G E R U L E M A I N M E N U 1 MESSAGE ID - Specify the ID of the message(s) to be processed 2 DOCUMENTATION - Add comments to this Rule 3 CONDITIONS - Supply additional criteria for this Rule to fire 4 ACTIONS - Take action with respect to the message(s) 5 INITIALIZATION - One-time initialization done when Rule is ENABLEd 6 TERMINATION - Specify actions to be taken when Rule is DISABLEd

    In response to your selection, the Primary Event Specification Panel for message rules appears. A sample follows.

  6. Supply the primary selection criterion. There is a unique Primary Event Specification panel for each type of rule. The primary event is the criterion that is used to execute the rule. For message rules, the primary event is always a message ID. To continue with this example, enter IEF287I in the MSG ID field.

    Notice that this has already been done in the sample panel shown here:

    EasyRule --------------------------------------------------------------------- Command ===> S P E C I F Y M E S S A G E I D MSG ID ===> IEF287I JUST SUPPRESS ===> N (Y/N/D) or JUST DELETE ===> N (Y/N/D) DELETE FROM OPSLOG === N (Y/N) MSG ID is used to determine if this Rule should perform an Action. It must be 1 to 10 characters in length and may optionally include a "wildcard" character '*'. MSG ID is the only required field. If you just want to SUPPRESS or DELETE the message, type Y next to the appropriate entry. Subsequent panels are bypassed if using Step-thru mode. DELETE is like SUPPRESS, but also deletes the message from SYSLOG. D is the same as Y except that in Step-thru mode, you will be given a chance to enter comments about the rule

    After you specify the message ID for the rule, EasyRule returns you to the Message Rule Main Menu, which is shown next.

  7. Select option 2 DOCUMENTATION from the Message Rule Main Menu. Notice that this sample specifies 2:

    EasyRule --------------------------------------------------------------------- Option ===> 2 M E S S A G E R U L E M A I N M E N U 1 MESSAGE ID - Specify the ID of the message(s) to be processed 2 DOCUMENTATION - Add comments to this Rule 3 CONDITIONS - Supply additional criteria for this Rule to fire 4 ACTIONS - Take action with respect to the message(s) 5 INITIALIZATION - One-time initialization done when Rule is ENABLEd 6 TERMINATION - Specify actions to be taken when Rule is DISABLEd

    In response to your selection, the Create Rule Comments panel appears. A sample panel follows.

  8. DDocument the rule you create. We recommand that you provide comments for a rule. Continue with this example by entering the comments that the following sample of shows on your Create Rule Comments panel. These comments provide you with an audit trail of changes in the History section, and a general explanation of the original problem in the Rule Function section.

    EasyRule -------------- CREATE RULE COMMENTS EXAMPLE ----------------- Tutorial C R E A T E R U L E C O M M E N T S Rule Name ===> ARC0027I Rule Type ===> MSG Rule Function ===> When the log is switched, submit a job named "HSMLOG" ===> followed by our 2-character system ID. For example: ===> HSMLOGS4 for the system we call "S4". Author ===> CA Support ===> CA Related Rules ===> ARC0026I,ARC0028I Related CPs ===> NONE History ===> ADA 2009/01/03 Original Implementation ===> ADA 2009/02/01 Changed diskrdr name so it is generic ------------------------------------------------------------------------------- This example will generate the highlighted OPS/REXX statements: )MSG ARC0027I /* Rule Name: ARC0027I */ /* Rule Type: MSG */ /* Rule Function: When the log is switched, submit a job named "HSMLOG" */ Press ENTER to return, or END to terminate tutorial

    After you enter comments for the rule, EasyRule returns you once more to the Message Rule Main Menu.

  9. Select option 4 ACTIONS from the Message Rule Main Menu. Notice that 4 has been specified in the sample shown here:

    EasyRule --------------------------------------------------------------------- Option ===> 4 M E S S A G E R U L E M A I N M E N U 1 MESSAGE ID - Specify the ID of the message(s) to be processed 2 DOCUMENTATION - Add comments to this Rule 3 CONDITIONS - Supply additional criteria for this Rule to fire 4 ACTIONS - Take action with respect to the message(s) 5 INITIALIZATION - One-time initialization done when Rule is ENABLEd 6 TERMINATION - Specify actions to be taken when Rule is DISABLEd

    In response to your entry, the Take Action menu for message rules appears. Use this menu to specify the actions that you want to take place when the rule is enabled.

    A sample Take Action menu appears.

  10. Select O from the Take Action menu that lets you issue operator commands.

    For this example, suppose that you want CA OPS/MVS to write the IEF287I messages to your job log. To complet this task, you instruct CA OPS/MVS to issue two console commands. Before you can specify these commands, select O. Notice that the following sample panel specifies O in the Option field.

    EasyRule ---------------------------------------------------------------------- Option ===> M E S S A G E R U L E -- T A K E A C T I O N The actions you specify via these panels will be taken for all messages that have the Message ID you specified and pass any additional tests you supplied via the "Additional Criteria" panels. 1 Suppress G Update Global variables 2 Message deletion L Update Local or Global variables 3 Re-route to other consoles M Issue z/OS messages 4 Re-word the Message N Send a NetMaster Alert 5 Hilite/Color/Change DESC codes O Issue Operator commands 6 Reply (WTORs only) P Page support people 7 Send to another system (MSF) Q Perform SQL update or insert 8 Throttle Message display rate S Send messages to TSO users 9 Update Environmental variables U Issue UNIX commands X Run REXX/CLIST program in Server Press ENTER to step thru EasyRule, or END to return

    After you enter O in the Option field, the Issue Console Commands panel appears.

    A sample panel appears.

  11. Write messages to the job log. You can now enter the commands that you want CA OPS/MVS to issue when the rule is enabled. On your Issue Console Commands panel, type the commands as shown in the next example. These entries cause CA OPS/MVS to issue two display message commands to record the problem in the job log.

    Note: These sample entries apply to a JES2 environment only. For JES3 environments, you use a slightly different procedure.

    In the first command, msg.jobnm is replaced by the name of the job that had the cataloging problem, followed by the text of the original IEF287I message. The second command is a warning to verify the results of the job.

    EasyRule --------------------------------------------------------------------- Command ===> I S S U E C O N S O L E C O M M A N D S CMD 1 ===> $d m {msg.jobnm},received {msg.text}___________ CMD 2 ===> $d m {msg.jobnm},verify results________________ CMD 3 ===> _______________________________________________ CMD 4 ===> _______________________________________________ CMD 5 ===> _______________________________________________ CMD 6 ===> _______________________________________________ CMD 7 ===> _______________________________________________ CMD 8 ===> _______________________________________________ CMD 9 ===> _______________________________________________ CMD 10 ===> _______________________________________________ CMD 11 ===> _______________________________________________ CMD 12 ===> _______________________________________________ CMD 13 ===> _______________________________________________ CMD 14 ===> _______________________________________________ CMD 15 ===> _______________________________________________ CMD 16 ===> _______________________________________________

    After you enter the console commands, EasyRule returns you to the Take Action menu.

    A sample follows.

  12. Select 5 Hilite/Color/Change DESC Codes from the Take Action menu. Notice that the following sample specifies 5:

    EasyRule --------------------------------------------------------------------- Option ===> M E S S A G E R U L E -- T A K E A C T I O N The actions you specify via these panels will be taken for all messages that have the Message ID you specified and pass any additional tests you supplied via the "Additional Criteria" panels. 1 Suppress G Update Global variables 2 Message deletion L Update Local or Global variables 3 Re-route to other consoles M Issue z/OS messages 4 Re-word the Message O Issue Operator commands 5 Hilite/Color/Change DESC codes P Page support people 6 Reply (WTORs only) Q Perform SQL update or insert 7 Send to another system (MSF) S Send messages to TSO users 8 Throttle Message display rate U Issue UNIX commands 9 Update Environmental variables X Run REXX/CLIST program in Server Press ENTER to step thru EasyRule, or END to return

    After you select option 5, the Hilite/Descriptor Codes panel appears.

    A sample follows.

  13. Specify descriptor code as SYSFAIL. On the Hilite/Descriptor Codes panel, place the letter S in the space in front of SYSFAIL, as shown in the following example. This action indicates that you want to change the old descriptor code to a value of 1.

    EasyRule --------------------------------------------------------------------- Command ===> M E S S A G E R U L E -- H I L I T E / D E S C R I P T O R C O D E S Use S to select one or more of the following NEW Descriptor codes: S SYSFAIL (1) - (Hilite, non-scrollable) _ IMEDACTN (2) - (Hilite only) (NOTE: Codes 1-6 and 11 _ EVENACTN (3) are mutually exclusive) _ SYSSTAT (4) _ IMEDCMD (5) _ JOBSTAT (6) _ APPLPRGM (7) _ OOLMSG (8) _ OPERREQ (9) _ DYNSTAT (10) _ CRITEVET (11) Other Descriptor code(s) ===> __ __ __ __ __ Variable containing Descriptor code(s) ===> _____________________________

    After you type S and press Enter, EasyRule returns you to the Take Action menu.

  14. Access the EasyRule Final Options menu. From the Take Action menu, press PF3 until the EasyRule Final Options menu appears. You use the EasyRule Final Options menu to determine the disposition of the OPS/REXX code EasyRule built from your panel entries.

    A sample EasyRule Final Options menu follows.

  15. Review the OPS/REXX code that EasyRule built. We recommend that you review the code EasyRule generated for your rule. To do so, choose option 3, for BROWSE, on the EasyRule Final Options menu. Notice that 3 has been specified in the sample panel shown here:

    EasyRule --------------- MSI1 --- O P S V I E W --------------- Subsystem OPSS Option ===>3 EEEEE AAAA SSSSS YY YY RRRRR UU UU LL EEEEE EE AA AA SS YYYY RR R UU UU LL EE EEEE AAAAAA SSSSS YY RRRRR UU UU LL EEEE EE AA AA SS YY RR RR UU UU LL EE EEEEE AA AA SSSSS YY RR RR UUUU LLLLL EEEEE 1 SAVE - SAVE the Rule that was built and EXIT 2 CANCEL - EXIT and DO NOT SAVE the Rule that was built 3 BROWSE - Browse the generated OPS/REXX code 4 ALTER - Return to the panels to modify the Rule DO YOU WANT TO BE ABLE TO MODIFY THIS RULE WITH EASYRULE? ==> Y (Y/N) DO YOU INTEND TO INSERT USER PROCESSING CODE IN THIS RULE? ==> N (Y/N) DO YOU INTEND TO INSERT USER INITIALIZATION CODE IN THIS RULE? ==> N (Y/N) DO YOU INTEND TO INSERT USER TERMINATION CODE IN THIS RULE? ==> N (Y/N)

    When you enter 3 on the EasyRule Final Options menu, a panel similar to the sample here appears:

    BROWSE -- EASY_RULE_BROWSE ------------------------- Line 00000000 Col 001 080 Command ===> Scroll ===> CSR ********************************* Top of Data ********************************* )MSG IEF287I )PROC /*--------------------------------------------------------------------*/ /* The following code is executed each time the rule is fired. */ /*--------------------------------------------------------------------*/ /*------------------------------------------------------------------*/ /* Modify the descriptor codes. This may cause the */ /* message highlighting to change on the consoles. */ /*------------------------------------------------------------------*/ MSG.DESC = OPSBITS("SYSFAIL ") /*------------------------------------------------------------------*/ /* Issue MVS/JES/VM commands. */ /*------------------------------------------------------------------*/ address OPER "$d m "msg.jobnm",received "msg.text if RC ^= 0 then do address WTO "TEXT('"||OPSINFO('PROGRAM') , "issue operator command 01 failed;" , "address OPER RC="||rc||"')" , "MSGID('OPEASYERR')" do while QUEUED() ^= 0 pull opererr address WTO "TEXT('"||opererr||"')" , "MSGID('OPEASYERR')" end end "$d m "msg.jobnm",verify results" if RC ^= 0 then do address WTO "TEXT('"||OPSINFO('PROGRAM') , "issue operator command 02 failed;" , "address OPER RC="||rc||"')" , "MSGID('OPEASYERR')" do while QUEUED() ^= 0 pull opererr address WTO "TEXT('"||opererr||"')" , "MSGID('OPEASYERR')" end end return

    Note: This example is actually two separate screens. We combined them for the purpose of this example.

    The panel shown on the previous page presents the OPS/REXX code EasyRule generates as a result of the panel entries suggested in this sample session. This code exists only in storage; later you save it to the data set and member that you specified on the EasyRule Primary panel.

    The following list shows the OPS/REXX code and the panel entries that correspond to it:

    MSG IEF287I

    Rule Type Selection panel and Primary Event Specification panel

    Comments box

    Create Rule Comments panel

    Value of MSG.DESC

    Hilite/Descriptor Codes panel

    Commands in the Address OPER section

    Issue Console Commands panel

    Return

    Primary Event Specification panel

  16. Save the OPS/REXX code as a new rule. When you finish browsing the generated OPS/REXX code, press PF3 to return to the EasyRule Final Options menu, shown here:

    EasyRule --------------- MSI1 --- O P S V I E W --------------- Subsystem OPSS Option ===> 1 EEEEE AAAA SSSSS YY YY RRRRR UU UU LL EEEEE EE AA AA SS YYYY RR R UU UU LL EE EEEE AAAAAA SSSSS YY RRRRR UU UU LL EEEE EE AA AA SS YY RR RR UU UU LL EE EEEEE AA AA SSSSS YY RR RR UUUU LLLLL EEEEE 1 SAVE - SAVE the Rule that was built and EXIT 2 CANCEL - EXIT and DO NOT SAVE the Rule that was built 3 BROWSE - Browse the generated OPS/REXX code 4 ALTER - Return to the panels to modify the Rule DO YOU WANT TO BE ABLE TO MODIFY THIS RULE WITH EASYRULE? ==> Y (Y/N) DO YOU INTEND TO INSERT USER PROCESSING CODE IN THIS RULE? ==> N (Y/N) DO YOU INTEND TO INSERT USER INITIALIZATION CODE IN THIS RULE? ==> N (Y/N) DO YOU INTEND TO INSERT USER TERMINATION CODE IN THIS RULE? ==> N (Y/N)

    Select 1 from the menu, as shown in the sample above. As a result, EasyRule saves the rule to the data set and member you specified earlier and returns you to the EasyRule Primary panel.

More information:

Using EasyRule