OPS/MVS

 View Only
  • 1.  Has anyone automated the DSNX881I message for IDAA DB2?

    Posted Sep 06, 2016 04:37 PM

    We are just now bringing up the IDAA appliance and the message that it uses, DSNX881I, is rather ugly.

     

    I was wondering if anyone has created any OPS rules for it to send emails or do actions?

     

    The message looks like just a dump from the Netezza box to the IBM Client and the Client just puts out what it gets.  No formatting.

     

    Example this is actually one message but multiple presentations.  It does not seem to present as a MLWTO.

     

    DSNX881I  =DT02- 20 E 95066 (2016-09-06 20:22:33 UTC) 680                
    IDAADB2S(10.14.2.250) The replication status for DB2 location DB2S       
    (subscription DWAB2LDB) is missing, check that the replication           
    capture agent: is running, has valid credentials, is attached to DB2     
    and is reachable u                                                       

    DSNX881I  =DT02- 20 E 95066 (2016-09-06 20:22:33 UTC) 681                
    IDAADB2S(10.14.2.250) nder 10.14.2.129:5999 from the Accelerator         
    network 

     

     

    from the second line on the second DSNX881I the NDER is the continuation of the U from the end of the first DSNX881I - which makes the word          under

     

     

     

    Thanks

     

    Lizette



  • 2.  Re: Has anyone automated the DSNX881I message for IDAA DB2?

    Posted Sep 07, 2016 08:50 AM

    Lizette,

     

    Looking at these messages on one of our development systems here, and these are definitely 'ugly' messages. Good thing is at least these are true MLWTOs (as seen by displaying the OPSFLAGS field in the OPSLOG) so the MLWTO specifier can be used ( )MSG DSNX881I MLWTO) to simplify the rule logic in breaking up the data. The 'twist' will be associating (or knowing when to associate) the 'continuation' MLWTOs when they occur. From my quick view it looks like the 4th and 5th words of the message (  E 95066 in your example message) can be used to do this linking of MLWTOs. Perhaps someone in the user community can shed some specific detail. I will also reach out to some of our DB2 folks in house to get some clarification.  Provide some detail (if you have it) of what actions you want to perform for these events, and I will create something here for you.

     

    Dave Gorisek



  • 3.  Re: Has anyone automated the DSNX881I message for IDAA DB2?

    Posted Sep 07, 2016 08:56 AM

    Should of dug into DB2 doc before first reply, but found this:

     

    ACCELERATOR_MESSAGE_COUNTER

    An internal counter that increases with every additional error on the accelerator.

    If the text after the DSNX881I qualifier is longer than 255 characters, another DSNX881I message is issued.

    All messages belonging together will have the same <ACCELERATOR_MESSAGE_COUNTER> value.

    The <MESSAGE-TEXT> block of the each subsequent message contains a sequel to the information in the previous message.

     

    So with this we can use the > 255 logic to determine if a 'subsequent' MLWTO has additioial info as to which the rule will have to store away (in GLVTEMP* vars) the relevant data from the first MLWTO. Again, map out exactly what you want to do for this event, and we'll put together a sample to assist you.

     

    Dave 



  • 4.  Re: Has anyone automated the DSNX881I message for IDAA DB2?

    Posted Sep 07, 2016 10:01 AM

    I have actually coded a Message Rule for this in our Production environment to trap on DSNX881I and create a ticket for our Tier 2 infrastructure team.  This message is a multi-line multi-message WTO.  It is ugly, indeed.  The requirements given to me were to get all of the message text, but strip off the header for every message except the first one.  For example, they wanted this.....

     

    DSNX881I  =DT02- 20 E 95066 (2016-09-06 20:22:33 UTC) 680               
    IDAADB2S(10.14.2.250) The replication status for DB2 location DB2S      
    (subscription DWAB2LDB) is missing, check that the replication          
    capture agent: is running, has valid credentials, is attached to DB2    
    and is reachable u                                                      

    DSNX881I  =DT02- 20 E 95066 (2016-09-06 20:22:33 UTC) 681               
    IDAADB2S(10.14.2.250) nder 10.14.2.129:5999 from the Accelerator        
    network

     

    to look like this.......

     

    DSNX881I  =DT02- 20 E 95066 (2016-09-06 20:22:33 UTC) 680               
    IDAADB2S(10.14.2.250) The replication status for DB2 location DB2S      
    (subscription DWAB2LDB) is missing, check that the replication          
    capture agent: is running, has valid credentials, is attached to DB2    
    and is reachable under 10.14.2.129:5999 from the Accelerator        
    network


    Notice how the header for the second message has been stripped off?

     

    Here is what I ended up coding:

     

    )MSG DSNX881I MLWTO
    )INIT             
    /*** Setting initial local global variable values that will count the number of lines in the message and the message number itself so you know which DSNX881I messages belong together. ***/
      $SET = opsvalue('GLVTEMPL.DSNX881I.LINE_COUNT','U',0)
      $SET = opsvalue('GLVTEMPL.DSNX881I.MSG_COUNTER','U',0)

    )PROC     

      /** The only reason I keep a line count is so I know if I am looking for a new DSNX881I message or a continuation. **/
      $LINEcount = msg.text.0                                       
      $COUNTERval = opsvalue('GLVTEMPL.DSNX881I.MSG_COUNTER','V')   
      $TOTALline_count = opsvalue('GLVTEMPL.DSNX881I.LINE_COUNT','V')
      $MSGcombined = ''                     
                                                                     
      /** NEW MULTI-MESSAGE MLWTO **/                               
      if $TOTALline_count = 0 then                                  
        call MESSAGE_NEW                                            
                                                                    
      /** CONTINUATION OF MULTI-MESSAGE MLWTO **/                   
      if $TOTALline_count > 0 then                                  
        call MESSAGE_CONTINUED                                      
    exit                  

                                              

    /*** The subroutines start here for either a new DSNX881I message or a continuation of one. ***/
    /*** DSNX881I messages are unique based on their Message Counter Number. In the case of your example message, that value is 95066. I also was required trap on the Message Severity value, which in your example is 'E' for "Error". ***/

     

    MESSAGE_NEW:                                                            
      do a = 1 to $LINEcount                                                
        $MSG.a = msg.text.a                                                 
        if a = 1 then do                                                    
          parse value $MSG.a with $MSGid $SSID $MSGnbr $MSGsev $MSGcntr $REST
          $MSGcombined = $MSGcombined $MSG.a                                
        end /* IF 1st line of the message. */                               
        else                                                                
          $MSGcombined = $MSGcombined $MSG.a                                
      end /* Loop through every line of the MLWTO. */                       
      if $MSGcntr ¬= $COUNTERval & $MSGsev = 'E' then do
        $MSGcombined = strip($MSGcombined)

                 /*Storing combined message in global variable.*/
          $SET = opsvalue('GLVTEMPL.DSNX881I.MSG_COMBINE','U',$MSGcombined)
          $SET = opsvalue('GLVTEMPL.DSNX881I.MSG_COUNTER','U',$MSGcntr)     
          $SET = opsvalue('GLVTEMPL.DSNX881I.LINE_COUNT','U',$LINEcount)     
          call TICKET

      end /* New DSNX881I Error message group. */
    return

     

    /*** This Continuation subroutine looks for a match of Message Counter, and the end of the header in the second line and takes everything after it, then adds it to the combined message. ***/

     

    MESSAGE_CONTINUED:                                                      
      $SAMEmessage = 'NO'                                                   
      do b = 1 to $LINEcount                                                
        $MSG.b = msg.text.b                                                 
        if b = 1 then do                                                    
          parse value $MSG.b with $MSGid $SSID $MSGnbr $MSGsev $MSGcntr $REST
        end /* IF 1st line of the message. All we need is $MSGcntr. */      
        if $MSGcntr = $COUNTERval then do                                   
          $SAMEmessage = 'YES'                                              
          if b = 2 then do                                                  
            parse value $MSG.b with . ')' $REST                             
            $REST = strip($REST)                                            
            $MSGcombined = $MSGcombined $REST                               
            $MSGcombined = strip($MSGcombined)                              
          end /* IF 2nd line of the message. Get rid of what we dont need. */
          if b > 2 then do                                                  
            $MSGcombined = $MSGcombined $MSG.b                              
          end /* IF not the first 2 lines of the message. */                
        end /* Current Message Counter matches Global Message Counter. */   
      end /* Loop through every line of the MLWTO. */

     

         /*** This part just adds the continued message to the combined message in the global variable. ***/
      if $SAMEmessage = 'YES' then do                                       
        $MSGglv = opsvalue('GLVTEMPL.DSNX881I.MSG_COMBINE','V')             

        $MSGupdate = $MSGglv $MSGcombined                                  
        $MSGupdate = strip($MSGupdate)                                     
        $SET = opsvalue('GLVTEMPL.DSNX881I.MSG_COMBINE','U',$MSGupdate)     
        $TOTALline_count = $TOTALline_count + $LINEcount                   
        $SET = opsvalue('GLVTEMPL.DSNX881I.LINE_COUNT','U',$TOTALline_count)
      end /* IF this is another message group for combined MLWTOs. */      
    return   

                                                                  

    TICKET:
    /*** This subroutine is called by the MESSAGE_NEW subroutine and it contains a dynamic rule that waits 5 seconds in order to let the entire combined DSNX881I message text to build, and then it generates the ticket. I did not include the code for this because I did not think it was completely necessary. Let me know if you would like to see it, though. ***/



  • 5.  Re: Has anyone automated the DSNX881I message for IDAA DB2?

    Posted Sep 07, 2016 10:45 AM

    Thank you for this coding.  I will work with it and see what I can do with it.  For now, we just are trying to send an email notification with the complete text. 

    FYI.  I have opened an RFE (Request for Enhancement) with IBM to make this message easier on automation.  From what I can see, it just looks like a dump from Netezza to the Client on z/OS.  Which means they have the ability to make this a more usable format.

     

    Lizette