AMQ3TRG4 sample program" /> The AMQ3TRG4 sample trigger monitor

 

The AMQ3TRG4 sample trigger monitor

AMQ3TRG4 is a trigger monitor. It takes one parameter: the name of the initiation queue it is to serve. AMQSAMP4 defines a sample initiation queue, SYSTEM.SAMPLE.TRIGGER, that we can use when you try the sample programs.

AMQ3TRG4 submits an OS/400 job for each valid trigger message it gets from the initiation queue.

 

Design of the trigger monitor

The trigger monitor opens the initiation queue and gets messages from the queue, specifying an unlimited wait interval.

The trigger monitor submits an OS/400 job to start the application specified in the trigger message, and passes an MQTMC (a character version of the trigger message) structure. The environment data in the trigger message is used as job submission parameters.

Finally, the program closes the initiation queue.