IBM Support

Message Monitor Replacement Variables



Message Monitor Replacement Variables


You are in: IBM i Technology Updates  > IBM Navigator for i > Enhancements list > System Monitors > Message Monitor Replacement Variables

Message Monitor Replacement Variables:

Replacement variables are available to customize your actions to the specific metric and values

These replacement variables can be used on the IBM i trigger command.  For example, rather than just

SNDMSG MSG(“message mon”) TOUSR(*SYSOPR)

You can use replacement variable:

SNDMSG MSG('Monitor &MON triggered, ID= &MSGID.') TOUSR(*SYSOPR)

Message Monitor Command Substitution Parameter Description & Lengths: 

Parameter               Length

&DATE                      Date, length depends on format

	The format and length for the date parameter (&DATE) depends on the system values QDATFMT & QDATSEP.  
        In most cases, the length of the variable &DATE will be 8.  
            For example:
              If QDATFMT = MDY and QDATSEP is '/', the format will be MM/DD/YY (length=8)
              If QDATFMT = DMY and QDATSEP is '-', the format will be DD-MM-YY (length=8)
            A special case is when QDATFMT = JUL and QDATSEP='/'.  
              In this situation &DATE format will be YY/DDD (length = 6)

&MON                       Monitor name (variable length 1-64).

&TIME                      Time (length 6) HHMMSS.

&ENDPOINT           Endpoint system name (variable length 1-256).

&EVENTTYPE         Event type and defined as follows: (length 1)

               Triggered With Command Event = 1

               Triggered Without Command Event = 2

               Manual Reset With Command Event = 3

               Manual Reset Without Command Event = 4

               Automatic Reset Event = 5

&FRMJOBNUMBER  From job number for the message causing the trigger (length 6).

&FRMJOBNAME       From job name for the message causing the trigger (variable length 1-10).

&FRMPROGRAM      From program for the message causing the trigger (variable length 1-10).

&FRMUSER               From job user for the message causing the trigger (variable length 1-10).

&MSGKEY                  Message key hex value (4-byte binary) identifying the message causing the trigger. 

&MSGKEYCH            Message key hex value (4-byte character array) identifying the message causing the trigger. 

  •                         • SNDMSG(&MSGKEYCH) will be shown in ebcdic (unreadable)
  •                         •  If dumped from memory when passed to a CL program, it will show the hex value that matches the &MSGKEY hex value (ie 00003D20)

&MSGID                   Message ID causing the trigger (length 7).

&MSGSEV                Message severity causing the trigger (length 1-2).

&MSGTYPE              Message type causing the trigger (length 2).

&MSGCOUNT          Current message count that caused the trigger (length 1-3).

&OWNER                  Monitor owner (length 1-10)

&THRESHOLD         Threshold number causing the trigger (length 1-3).

&TOLIB                     Message queue's library to which this message was sent (the library of the queue being monitored), (length 1-10).

&TOMSGQ               Message queue name to which this message was sent (the queue being monitored), (length 1-10).


There are no valid substitution values for these parameters if they are in the reset commands:

  • &MSGKEY,
  • &MSGID,
  • &MSGSEV,

[{"Business Unit":{"code":"BU058","label":"IBM Infrastructure w\/TPS"},"Product":{"code":"SWG60","label":"IBM i"},"Component":"","Platform":[{"code":"PF012","label":"IBM i"}],"Version":"All Versions","Edition":"","Line of Business":{"code":"LOB08","label":"Cognitive Systems"}}]

Document Information

Modified date:
30 October 2020