WebSphere MQ for iSeries trigger monitors

 

In WebSphere MQ for iSeries™, instead of runmqtrm (see Trigger monitors on UNIX and Windows systems), use the command

STRMQMTRM INITQNAME(InitQ) MQMNAME(QMgrName)

Details are as for runmqtrm.

The following sample programs are also provided, which you can use as models to write your own trigger monitors:

AMQSTRG4

This is a trigger monitor that submits an i5/OS job for the process that is to be started, but this means that there is a processing overhead associated with each trigger message.

AMQSERV4

This is a trigger server. For each trigger message, this server runs the command for the process in its own job, and can call CICS transactions.

Both the trigger monitor and the trigger server pass an MQTMC2 structure to the programs that they start. For a description of this structure, see the Application Programming Reference. Both of these samples are delivered in both source and executable forms.

Because these trigger monitors can invoke only native i5/OS programs, they cannot trigger Java™ programs directly, because Java classes are located in the IFS. However, Java programs can be triggered indirectly by triggering a CL program that then invokes the Java program and passes across the TMC2 structure. The minimum size of the TMC2 structure is 732 bytes.

The source of a sample CLP is shown below:

  PGM PARM(&TMC2)
    DCL &TMC2 *CHAR LEN(800)
      ADDENVVAR ENVVAR(TM) VALUE(&TMC2)
      QSH  CMD('java_pgmname $TM')
      RMVENVVAR ENVVAR(TM)
  ENDPGM

 

Parent topic:

Trigger monitors


fg13990_