Trigger monitors on AIX, Linux, and Windows systems
This topic contains information about trigger monitors provided on AIX®, Linux®, and Windows systems.
- amqstrg0
- This is a sample trigger monitor that provides a subset of the function provided by runmqtrm. See Using the sample programs on Multiplatforms for more information about amqstrg0.
- runmqtrm
- The syntax of this command is runmqtrm [
-m QMgrName] [-q InitQ], where QMgrName is the queue manager and InitQ is the initiation queue. The default queue is SYSTEM.DEFAULT.INITIATION.QUEUE on the default queue manager. It calls programs for the appropriate trigger messages. This trigger monitor supports the default application type.The command string passed by the trigger monitor to the operating system is built as follows:- The
ApplIdfrom the relevant PROCESS definition (if created) - The MQTMC2 structure, enclosed in double quotation marks
- The
EnvDatafrom the relevant PROCESS definition (if created)
ApplIdis the name of the program to run as it would be entered on the command line.The parameter passed is the MQTMC2 character structure. A command string is invoked that has this string, exactly as provided, in double quotation marks, in order that the system command will accept it as one parameter.
The trigger monitor does not look to see if there is another message on the initiation queue until the completion of the application that it has just started. If the application has much processing to do, the trigger monitor might not be able to keep up with the number of trigger messages arriving. You have two options:- Have more trigger monitors running
- Run the started applications in the background
If you have more trigger monitors running, you can control the maximum number of applications that can run at any one time. If you run applications in the background, there is no restriction imposed by IBM® MQ on the number of applications that can run.
![[AIX]](ngaix.gif)
To run the started application in the background on AIX and Linux, put an & at the end of the
EnvDataof the PROCESS definition.To run the started application in the background on Windows systems, within theApplIdfield, prefix the name of your application with a START command. For example:START ?B AMQSECHA
Note: Where a Windows path has spaces as a part of the
path name, these should be enclosed in quotation marks (") to ensure that it is handled as a single
argument. For example, C:\Program Files\Application Directory\Application.exe
.The following is an example of an APPLICID string where the file name includes spaces as a part of the path:START "" /B "C:\Program Files\Application Directory\Application.exe"The syntax of the Windows START command in the example includes an empty string enclosed in double quotation marks. START specifies that the first argument in quotation marks will be treated as the title of the new command. To ensure that Windows does not mistake the application path for a 'title' argument, add a title string enclosed in double quotation marks to the command before the application name.
- The
- runmqtmc
- This is the same as runmqtrm except that it links with the IBM MQ MQI client libraries.