The Inquire sample programs

 

The Inquire sample programs inquire about some of the attributes of a queue using the MQINQ call. See Features demonstrated in the sample programs for the names of these programs.

These programs are intended to run as triggered programs, so their only input is an MQTMC2 (trigger message) structure for i5/OS, Windows systems, and UNIX. This structure contains the name of a target queue whose attributes are to be inquired. The C version also uses the queue manager name. The COBOL version uses the default queue manager.

For the triggering process to work, ensure that the Inquire sample program that you want to use is triggered by messages arriving on queue SYSTEM.SAMPLE.INQ. To do this, specify the name of the Inquire sample program that you want to use in the ApplicId field of the process definition SYSTEM.SAMPLE.INQPROCESS. For i5/OS, we can use the CHGMQMPRC command described in the WebSphere MQ for iSeries System Administration Guide for this. The sample queue has a trigger type of FIRST; if there are already messages on the queue before you run the request sample, the inquire sample is not triggered by the messages that you send.

When you have set the definition correctly:

Use the Request sample programs to send request messages, each containing just a queue name, to queue SYSTEM.SAMPLE.INQ. For each request message, the Inquire sample programs send a reply message containing information about the queue specified in the request message. The replies are sent to the reply-to queue specified in the request message.

On i5/OS, if the sample input file member QMQMSAMP.AMQSDATA(INQ) is used, the last queue named does not exist, so the sample returns a report message with a reason code for the failure.

 

Parent topic:

Sample programs (all platforms except z/OS)


fg17550_