IBM GC34-5557-00 manual Appendix A. Sample MQI Programs, C, COBOL, and RPG Program Samples

Models: GC34-5557-00

1 127
Download 127 pages 62.8 Kb
Page 111
Image 111
Appendix A. Sample MQI Programs

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.

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.

Table 6. Sample programs ± source files

Technique

C

COBOL

RPG

 

 

 

 

Putting messages using MQPUT

AMQSPUT0

AMQ0PUT4

AMQnPUT4

 

 

 

 

Putting messages from a data

AMQSPUT4

±

±

file using MQPUT

 

 

 

 

 

 

 

Putting a single message using

AMQSINQ4

AMQ0INQ4

AMQnINQ4

MQPUT1

AMQSECH4

AMQ0ECH4

AMQnECH4

 

 

 

 

Putting messages to a

AMQSPTL4

±

±

distribution list

 

 

 

 

 

 

 

Replying to a request message

AMQSINQ4

AMQ0INQ4

AMQnINQ4

 

 

 

 

Getting messages (no wait)

AMQSGBR4

AMQ0GBR4

AMQnGBR4

 

 

 

 

Getting messages (wait with

AMQSGET4

AMQ0GET4

AMQnGET4

time limit)

 

 

 

 

 

 

 

Getting messages (unlimited

AMQSTRG4

±

AMQ3TRG4

wait)

 

 

 

 

 

 

 

Getting messages (with data

AMQSECH4

AMQ0ECH4

AMQnECH4

conversion)

 

 

 

 

 

 

 

Putting reference messages to a

AMQSPRM4

±

±

queue

 

 

 

 

 

 

 

Getting reference messages from

AMQSGRM4

±

±

a queue

 

 

 

 

 

 

 

Using reference message

AMQSQRM4

±

±

channel exit

AMQSXRM4

 

 

 

 

 

 

Using message exit

AMQSCMX4

±

±

 

 

 

 

© Copyright IBM Corp. 2000

99

Page 111
Image 111
IBM GC34-5557-00 manual Appendix A. Sample MQI Programs, C, COBOL, and RPG Program Samples