The Echo sample program

The Echo sample programs return the message send to a reply queue. The program is named AMQ3ECH4

The programs are intended to run as triggered programs, so their only input is the data read from the queue named in the trigger message structure.

For the triggering process to work, ensure that the Echo sample program you want to use is triggered by messages arriving on queue SYSTEM.SAMPLE.ECHO. To do this, specify the name of the Echo sample program you want to use in the ApplId field of the process definition SYSTEM.SAMPLE.ECHOPROCESS. (For this, we can use the CHGMQMPRC command, described in the WebSphere MQ for iSeries V6 System Administration Guide.) The sample queue has a trigger type of FIRST, so if there are already messages on the queue before you run the Request sample, the Echo sample is not triggered by the messages you send.

When you have set the definition correctly, first start AMQ3SRV4 in one job, then start AMQ3REQ4 in another. You could use AMQ3TRG4 instead of AMQ3SRV4, but potential job submission delays could make it less easy to follow what is happening.

Use the Request sample programs to send messages to queue SYSTEM.SAMPLE.ECHO. The Echo sample programs send a reply message containing the data in the request message to the reply-to queue specified in the request message.