Running the Triggering sample programs
This topic contains information about running Triggering sample programs.
Running the amqstrg0.c, amqstrg, and amqstrgc samples
The program takes 2 parameters:- The name of the initiation queue (necessary)
- The name of the queue manager (optional)
If a queue manager is not specified, it connects to the default one. A sample initiation queue will have been defined when you ran amqscos0.tst; the name of that queue is SYSTEM.SAMPLE.TRIGGER, and we can use it when you run this program.
Note: The function in this sample is a subset of the full triggering function that is supplied in the runmqtrm program.Running the AMQSTRG4 sample
This is a trigger monitor for the IBM i environment. It submits one IBM i job for each application to be started. This means that there is additional processing associated with each trigger message.
AMQSTRG4 (in QCSRC) takes two parameters: the name of the initiation queue that it is to serve, and the name of the queue manager (optional). AMQSAMP4 (in QCLSRC) defines a sample initiation queue, SYSTEM.SAMPLE.TRIGGER, that we can use when you try the sample programs.
Using the example trigger queue, the command to issue is:CALL PGM(QMQM/AMQSTRG4) PARM('SYSTEM.SAMPLE.TRIGGER')
Alternatively, we can use the CL equivalent STRMQMTRM; for details, see Start MQ Trigger Monitor (STRMQMTRM).
Running the AMQSERV4 sample
This is a trigger server for the IBM i environment. For each trigger message, this server runs the start command in its own job to start the specified application. The trigger server can call CICS transactions.
AMQSERV4 takes two parameters: the name of the initiation queue that it is to serve, and the name of the queue manager (optional). AMQSAMP4 defines a sample initiation queue, SYSTEM.SAMPLE.TRIGGER, that we can use when you try the sample programs.
Using the example trigger queue the command to issue is:CALL PGM(QMQM/AMQSERV4) PARM('SYSTEM.SAMPLE.TRIGGER')Parent topic: The Triggering sample programs