IBM GC34-5557-00 User Manual
Appendix A. Sample MQI Programs
MQSeries for AS/400 provides a set of short sample MQI programs. You can
choose to install these when you install the base product. If you do install
them, you get them in both source form and object form. You can use the
objects as they are or you can modify and recompile the source for
experimental purposes.
choose to install these when you install the base product. If you do install
them, you get them in both source form and object form. You can use the
objects as they are or you can modify and recompile the source for
experimental purposes.
C, COBOL, and RPG Program Samples
Table 6 lists the sample MQI source files. By default, the source files are in the
QMQMSAMP library, which is available as an installable option. To find out
more about what the programs do and how to use them, see the MQSeries
Application Programming Guide.
QMQMSAMP library, which is available as an installable option. To find out
more about what the programs do and how to use them, see the MQSeries
Application Programming Guide.
Table 6. Sample programs – source files
Technique
C
COBOL
RPG
Putting messages using MQPUT AMQSPUT0
AMQ0PUT4
AMQnPUT4
Putting messages from a data
file using MQPUT
file using MQPUT
AMQSPUT4
–
–
Putting a single message using
MQPUT1
MQPUT1
AMQSINQ4
AMQSECH4
AMQSECH4
AMQ0INQ4
AMQ0ECH4
AMQ0ECH4
AMQnINQ4
AMQnECH4
AMQnECH4
Putting messages to a
distribution list
distribution list
AMQSPTL4
–
–
Replying to a request message
AMQSINQ4
AMQ0INQ4
AMQnINQ4
Getting messages (no wait)
AMQSGBR4
AMQ0GBR4
AMQnGBR4
Getting messages (wait with
time limit)
time limit)
AMQSGET4
AMQ0GET4
AMQnGET4
Getting messages (unlimited
wait)
wait)
AMQSTRG4
–
AMQ3TRG4
Getting messages (with data
conversion)
conversion)
AMQSECH4
AMQ0ECH4
AMQnECH4
Putting reference messages to a
queue
queue
AMQSPRM4
–
–
Getting reference messages from
a queue
a queue
AMQSGRM4
–
–
Using reference message
channel exit
channel exit
AMQSQRM4
AMQSXRM4
AMQSXRM4
–
–
Using message exit
AMQSCMX4
–
–
© Copyright IBM Corp. 2000
99