Method 1: Using the MVS SEND command to forward situation event information

Information about an event can be forwarded to NetView for z/OS® using the MVS SEND command.

About this task

One way to cause a situation event to forward information about the event to NetView for z/OS is to use the MVS SEND command in the System Command input field of the situation's Action tab. If your system is configured such that NetView for z/OS is passed all messages, then the NetView program can use the entries in its automation table to determine if an action should be taken when the message is received. A limitation of this method is that MVS console commands are limited to 126 characters.

Do the following to set up the Mainframe Networks monitoring agent to use the MVS SEND command to forward situation event information to the NetView program.

Procedure

  1. Edit the situation that you want to use to trigger NetView for z/OS automation to specify a MVS SEND command in the System Command input field of the situation's Action tab.
    1. Open the Situation Editor by clicking the Situation Editor icon Graphic of the Situation Editor icon in the Tivoli® Enterprise Portal tool bar.
    2. Expand the nodes of the navigation tree on the left to locate the situation you want to edit. The IBM® Z OMEGAMON® AI for Networks monitoring agent situations are within the nodes labeled: Mainframe Network, TCP/IP and VTAM®. Figure 1 shows the Situation Editor with the TCP/IP node expanded:
      Figure 1. Situation Editor with the TCP/IP node expanded
      Situation Editor with the TCP/IP node expanded
    3. Select the situation from which you want to launch NetView for z/OS automation and copy it by right-clicking on it and selecting the Create another option from the menu displayed, as shown in Figure 2:
      Figure 2. Situation Editor showing how to copy a predefined situation
      Situation Editor showing how to copy a predefined situation
    4. Select the new situation you just created and click the Action tab.
    5. In the System Command field, enter the MVS SEND command with the message you want to pass to NetView for automation in the System Command input area, as shown in Figure 3
      Figure 3. Situation Editor with Action tab selected and a sample MVS SEND command shown
      Situation Editor with Action tab selected and a sample MVS SEND command shown
      When you enter a command in this field, type a command as you want it to be issued at the target system (in this case, z/OS). MVS commands cannot exceed 126 characters. Here is an example of a valid MVS SEND command:
      SE 'N3T_Sample_NetViewAuto_Msg',CN=INTERNAL
      Look at sample situation N3T_Sample_NetViewAuto_Msg within the TCP/IP node for an example or to copy it. You can use the Attribute Substitution button to pass attribute values in the message. The Attribute Substitution button opens a window for choosing an attribute. The attribute name is replaced by the actual value during execution of the action command.
      This command passes the value of the TCP/IP Address Space workspace CPU Percentage attribute:
      SE 'N3T_Sample_NetViewAuto_Msg CPUPercentage 
      &{TCPIP_Address_Space.CPU_Percentage}',CN=INTERNAL 

      For more information about specifying a correct MVS SEND command, see the z/OS MVS System Commands book.

    6. Click OK to save this command and close the Situation Editor.
  2. Develop an automation table entry to process the message sent by the situation event. In order for the message sent using the MVS SEND command to be processed by the NetView program, an entry needs to be added to your NetView automation table.
    An automation entry that processes an IBM® Z OMEGAMON® AI for Networks situation event might look like this code sample, found in the KN3AUMSG file in the &thilev.TKANSAM SMP/E target data set:
    /*%DATA    This file contains Rexx logic, but is mostly data         */
    **********************************************************************
    *
    * NAME(KN3AUMSG)
    * DESCRIPTION: Sample automation table entry for processing
    *              IBM® Z OMEGAMON® AI for Networks situations.
    *
    *              This sample assumes that information from an  
    *              IBM® Z OMEGAMON® AI for Networks situation is put into a
    *              message so that it can be processed by the NetView
    *              Automation Table.  The message text is assumed to
    *              start with the name of a situation.  All Mainframe
    *              Networks situation names start with the characters
    *              N3T_, N3V_, or N3A_.  If a message starting with one
    *              of these strings is found, REXX exec KN3SITEX is
    *              invoked with the message text.  The message is logged
    *              to the NetView log.
    *
    *              The message containing the situation information is
    *              sent using the MVS SEND command.  MVS console commands
    *              cannot exceed 126 characters.
    *
    **********************************************************************
    IF (MSGID = 'N3T_' . | MSGID = 'N3V_' . | MSGID = 'N3A_' .) &
       (TEXT = MESSAGE)
    THEN
      EXEC(CMD('KN3SITEX ' MESSAGE) ROUTE(ONE *))
      DISPLAY(N)
      NETLOG(Y)
      SYSLOG(N)
    This sample looks for messages that start with the first three characters of Mainframe Networks situation names. If a Mainframe Networks situation is matched, a REXX exec named KN3SITEX. is invoked with the message text. The REXX exec must be saved in a member of a data set which is one of the NetView application startup procedure's DSICLD DD statements. The message received is displayed in the NetView NETLOG only. The CONTINUE(NO) specifies that no other automation table entries are to be examined once this one is matched. The AUTOTBL NetView command can be used to compile and test your automation table entry. See the NetView command help for more information.

    See the IBM® Tivoli NetView for z/OS: Automation book for more information, particularly the topics on Automating Messages and Management Service Units (MSUs) and Writing Automation Table Statements to Automate Messages for detailed information on the syntax and functions available for automation table entries.

  3. Save the member containing your new automation table entry in a data set which is on one of the NetView application startup procedure's DSIPARM DD statements.
  4. Add a %INCLUDE for the member containing the new automation table entry at an appropriate place in your existing NetView automation table (DSITBL01 by default). Your entry will be in the table the next time you start NetView. You can use the NetView AUTOTBL command to add the entry to the currently active automation table without having to restart NetView. Adding your automation table entry this way is temporary for the current instance of NetView, but is good for testing.