Samples for UNIX and Linux systems
This topic shows the techniques demonstrated by the sample programs for IBM® MQ on UNIX and Linux® systems.
See Preparing and running sample programs on UNIX systems to find out where the sample programs for IBM MQ on UNIX and Linux systems are stored.
Table 1 The table lists which C and COBOL source files are provided, and whether a server or client executable is included.
|
C (source) ( 1 ) | COBOL (source) ( 2 ) | Server (C executable) | Client (C executable) ( 3 ) |
---|---|---|---|---|
Using the publish/subscribe interface | amqspuba amqssuba amqssbxa | no sample | amqspub amqssub amqssbx | no sample |
Putting messages using the MQPUT call | amqsput0 | amq0put0 | amqsput | amqsputc |
Putting a single message using the MQPUT1 call | amqsinqa amqsecha | amqminqx amqmechx amqiinqx amqiechx | amqsinq amqsech | amqsechc |
Putting messages to a distribution list ( 4 ) | amqsptl0 | amq0ptl0.cbl | amqsptl | amqsptlc |
Replying to a request message | amqsinqa | amqminqx amqiinqx | amqsinq | no sample |
Getting messages using browse (no wait) | amqsgbr0 | amq0gbr0 | amqsgbr | no sample |
Getting messages (wait with a time limit) | amqsget0 | amq0get0 | amqsget | amqsgetc |
Getting messages (unlimited wait) | amqstrg0 | no sample | amqstrg | amqstrgc |
Getting messages (with data conversion) | amqsecha | no sample | amqsech | no sample |
Putting Reference Messages to a queue ( 4 ) | amqsprma | no sample | amqsprm | amqsprmc |
Getting Reference Messages from a queue ( 4 ) | amqsgrma | no sample | amqsgrm | amqsgrmc |
Reference Message channel exit ( 4 ) | amqsqrma amqsxrma | no sample | amqsxrm | no sample |
Browsing first 20 characters of a message | amqsgbr0 | amq0gbr0 | amqsgbr | amqsgbrc |
Browsing complete messages | amqsbcg0 | no sample | amqsbcg | amqsbcgc |
Using a shared input queue | amqsinqa | amqminqx amqiinqx | amqsinq | amqsinqc |
Using an exclusive input queue | amqstrg0 | amq0req0 | amqstrg | amqstrgc |
Using the MQINQ call | amqsinqa | amqminqx amqiinqx | amqsinq | no sample |
Using the MQSET call | amqsseta | amqmsetx amqisetx | amqsset | amqssetc |
Using a reply-to queue | amqsreq0 | amq0req0 | amqsreq | amqsreqc |
Requesting message exceptions | amqsreq0 | amq0req0 | amqsreq | no sample |
Accepting a truncated message | amqsgbr0 | amq0gbr0 | amqsgbr | no sample |
Using a resolved queue name | amqsgbr0 | amq0gbr0 | amqsgbr | no sample |
Triggering a process | amqstrg0 | no sample | amqstrg | amqstrgc |
Using data conversion | ( 5 ) | no sample | no sample | no sample |
IBM MQ (coordinating XA-compliant database managers) accessing a single database using SQL | amqsxas0.sqc Db2® amqsxas0.ec Informix® | amq0xas0.sqb | no sample | no sample |
IBM MQ (coordinating XA-compliant database managers) accessing two databases using SQL |
amqsxag0.c
amqsxab0.sqc amqsxaf0.sqc |
amq0xag0.cbl
amq0xab0.sqb amq0xaf0.sqb |
no sample | no sample |
CICS® transaction ( 6 ) | amqscic0.ccs | no sample | amqscic0 | no sample |
Encina transaction ( 4 ) | amqsxae0 | no sample | amqsxae0 | no sample |
TUXEDO transaction to put messages ( 7 ) | amqstxpx | no sample | no sample | no sample |
TUXEDO transaction to get messages ( 7 ) | amqstxgx | no sample | no sample | no sample |
Server for TUXEDO ( 7 ) | amqstxsx | no sample | no sample | no sample |
Dead-letter queue handler | Directory ./tools/c/Samples/dlq ( 8 ) | no sample | amqsdlq | no sample |
From an MQI client, putting a message | no sample | no sample | no sample | amqsputc |
From an MQI client, getting a message | no sample | no sample | no sample | amqsgetc |
Connecting to the queue manager using MQCONNX | amqscnxc | no sample | no sample | amqscnxc |
Using API exits | amqsaxe0 | no sample | amqsaxe | no sample |
Cluster workload balancing exit | amqswlm0 | no sample | amqswlm | no sample |
Putting messages asynchronously and getting status using the MQSTAT call | amqsapt0 | no sample | amqsapt | amqsaptc |
Reconnectable clients |
amqsphac
amqsghac amqsmhac |
no sample | not applicable |
amqsphac
amqsghac amqsmhac |
Using message consumers to asynchronously consume messages from multiple queues | amqscbf0 | no sample | amqscbf | amqscbfc |
Specifying SSL/TLS connection information on MQCONNX | amqssslc | no sample | not applicable | amqssslc |
Notes:
- The executable version of the IBM MQ MQI client samples share the same source as the samples that run in a server environment.
- Compile programs beginning 'amqm' with the Micro Focus COBOL compiler, those beginning 'amqi' with the IBM COBOL compiler, and those beginning 'amq0' with either.
- The executable versions of the IBM MQ MQI client samples are not available on IBM MQ for HP-UX.
- Supported on IBM MQ for AIX®, IBM MQ for HP-UX, and IBM MQ for Solaris only.
- On IBM MQ for AIX, IBM MQ for HP-UX, and IBM MQ for Solaris this program is called amqsvfc0.c
- CICS is supported by IBM MQ for AIX and IBM MQ for HP-UX only.
- TUXEDO is not supported by IBM MQ for Linux on System p.
- The source for the dead-letter queue handler consists of several files and is provided in a separate directory.
Detailed information about support for UNIX and Linux systems is available at the IBM MQ systems requirements page at https://www.ibm.com/software/integration/wmq/requirements/.