AMQ3SRV4 sample program" />
The AMQ3SRV4 sample trigger server
AMQ3SRV4 is a trigger server. 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.
For each trigger message, AMQ3SRV4 runs a start command in its own job to start the specified application.
Using the example trigger queue the command to issue is:
CALL PGM(QMQM/AMQ3SRV4) PARM('Queue Name')where
Queue Name must be 48 characters in length, which you achieve by padding the queue name with the required number of blanks. Therefore, if you are using SYSTEM.SAMPLE.TRIGGER as your target queue, you will need 28 blank characters.
Design of the trigger server
The design of the trigger server is similar to that of the trigger monitor, except the trigger server:
- Allows CICS as well as OS/400 applications
- Does not use the environment data from the trigger message
- Calls OS/400 applications in its own job (or uses STRCICSUSR to start CICS applications) rather than submitting an OS/400 job
- Opens the initiation queue for shared input, so many trigger servers can run at the same time
Note:Programs started by AMQ3SRV4 must not use the MQDISC call because this will stop the trigger server. If programs started by AMQ3SRV4 use the MQCONN call, they will get the RC2002 reason code.