Home » IBM MQ Info Center » Sample IBM MQ C Code

IBM MQ Code Index
Assembler (z/OS) Code Samples C Code Samples
C Exit Code Samples C++ Code Samples
C# Code Samples COBOL Code Samples
Java Code Samples Java/JMS Code Samples
Jython Code Samples Perl Code Samples
PLI Code Samples Python Code Samples
Rexx Code Samples Visual Basic Code Samples

IBM MQ C Code Samples

File Size Date Description
      amqsactz: Please find the latest version of amqsactz in the SupportPac MH06 MQ Trace Tools.
download file 0.01 2013/04 amqscnxc_thread is the IBM sample code that has been enhanced to be multi-threaded for Linux. Source code included. Freeware. Author: IBM. (Updated by Tim Zielke)
download file 0.01 2003/06 amqsget is the IBM sample code that has been updated to use a 4MB message buffer. Source code included. Freeware. Author: IBM. (Updated by Roger Lacroix)
download file 0.01 2002/06 Backout demonstrates how to backout a poison message in C. Source code included. Freeware. Author: IBM.
download file 0.01 2005/01 ChlStatus is a sample C MQAI code that will retrieve the channel status. Source code included. Freeware. Author: unknown.
download file 0.01 2005/01 ClearQ is a sample C MQAI code that will issue the clear queue command. Source code included. Freeware. Author: unknown.
download file 0.01 1998/06 CWMQM Interface is a set of C routines to allow a new MQ programmer to have old programs MQ enabled in 5 minutes. This code is cross-platform complaint. I have included 5 sample programs that use the canned routines. Source code included. Freeware. Author: Roger Lacroix.
download file 0.01 2001/09 DeadLetterHandler is similar to other dead letter queue handles that you may have seen, but this one has a nice additional function. Not only will it browse the dead letter queue and place the dead letter headers of any messages on that queue in an easy to read report, but it will also reprocess these messages if you give it the necessary switch. In other words, it will attempt to reroute the messages on the dead letter queue to the original queues they were destined for, along with all the correct header information like MsgId and CorrelId. Source code included. Freeware. Author: Brandon Duncan.
download file 0.01 2005/01 EventMsg is a sample C MQAI code that will demonstrates how to handle event messages. Source code included. Freeware. Author: unknown.
download file 0.05 2015/11 EmptyQ is a simple program to continuously consume all messages of a particular queue. Source code included. Freeware. Author: Roger Lacroix. Source code included. Freeware. Author: Roger Lacroix.
download file 0.05 2010/06 File2Msg is a C program to read any file and write its contents as a message to a queue. This program was written to handle data with imbedded hex '00'. Source code included. Freeware. Author: Roger Lacroix.
download file 0.01 2001/01 GetGroup demonstrates getting messages in a group from message queue in C. Source code included. Freeware. Author: IBM.
download file 0.01 2002/06 Jsmqput demonstrates putting messages on a message queue in the format similar to messages generated by an MQ Java/JMS application. Source code included. Freeware. Author: IBM.
download file 0.01 2002/01 ListChl is a sample program (MQAI) to inquire on the channel status attributes of a local queue manager using the MQSeries Administration Interface (MQAI): channel name, status, curmsgs, msgs, shortrts, indoubt, lstmsgti. Source code included. Freeware. Author: Ruud van Zundert.
download file 0.01 2002/01 Log_Analysis is an MQSeries error log analysis utility. Source code included. Freeware. Author: Chris Bell.
download file 0.07 2002/01 MQAdHoc is a CLI program demonstrates using IBM MQ as an XA resource coordinator with DB2 UDB Version 7.2. Source code included. Freeware. Author: IBM.
download file 0.07 2002/11 MQCONNX_Sample is a C sample program which demonstrates how to use MQCONNX. Source code included. Freeware. Author: Didi Dotan.
download file 0.03 2015/11 mqcpcnvt is a program that will show you how a byte string will convert between code pages. Source code included. Freeware. Author: IBM. (Updated by Tim Zielke)
download file 0.62 1999/12 MQSeries C Sample Code. This is the C sample code from the toolkit directory of MQSeries v5.1 for Windows NT. Source code included. Freeware. Author: IBM.
download file 0.13 1998/01 MQSeries C (MVS) Sample Code. This is the C sample code from the toolkit pds of MQSeries v1.2 for OS/390 (MVS). Source code included. Freeware. Author: IBM.
download file 0.01 2001/01 MQSync demonstrates the use of syncpointing with MQSeries in C. Source code included. Freeware. Author: IBM.
download file 0.01 2001/01 MQThreadAix demonstrates the use of multiple threads to do MQSeries calls on AIX. Source code included. Freeware. Author: IBM.
download file 0.01 2001/01 MQThreadNT demonstrates the use of multiple threads to do MQSeries calls on Windows NT. Source code included. Freeware. Author: IBM.
download file 0.01 2001/01 MQThreadSun demonstrates the use of multiple threads to do MQSeries calls on Oracle Solaris. Source code included. Freeware. Author: IBM.
download file 0.01 2013/04 MQTrcStats is a C program that will take an MQ distributed trace and summarize MQI response time, total bytes, etc. for some of the more common MQIs. Source code included. Freeware. Author: Tim Zielke
download file 0.01 2006/02 MQ Utilities supplies sample code for 2 utilities that Put and Get data to and from queues with the optional ability to use AES encryption to secure the data. Source code included. Freeware. Author: Sid Young.
download file 0.05 2010/09 Msg2File is a C program to write the contents of a message to a file. Source code included. Freeware. Author: Roger Lacroix.
download file 0.01 2001/01 Namelist demonstrates the use of MQINQ to display properties of a namelist. Source code included. Freeware. Author: IBM.
download file 0.01 2001/01 NTLoadMQ demonstrates the use of dynamic load of MQSeries on Windows NT. Source code included. Freeware. Author: IBM.
download file 0.01 2005/04 PubSub demonstrates all the MA0C broker command messages, including reading the broker response message. Source code included. Freeware. Author: Nigel Goddard of IBM.
download file 0.01 2001/01 PubSub starts the NT pub/sub broker automatically by creating a two broker hierarchy. Source code included. Freeware. Author: IBM.
download file 0.10 2017/01 Pusher is a MQ application that will move messages from an input queue to output queues under sync-point. Source code. Freeware. Author: Capitalware Inc.
download file 0.01 2001/01 PutGroup demonstrates putting messages in a group to a message queue in C. Source code included. Freeware. Author: IBM.
download file 0.01 2003/01 QStatus is a sample code to show how to query QSTATUS using the MQAI interface. Source code included. Freeware. Author: IBM.
download file 0.04 2001/08 ReadQueue is a sample C program to read a message and print it to the screen. Source code included. Freeware. Author: Roger Lacroix.
download file 0.01 1998/07 Read_From_Oracle is a program that periodically reads a hypothetical Oracle table and transfers the contents, row by row, as individual messages, to a queue. It demonstrates the configuration file, how to put messages on a queue, and how to mix embedded SQL and MQI calls in the same program. Source code included. Freeware. Author: Fiendish.
download file 0.01 1998/07 Read_From_Queue is a program that reads messages from a queue and optionally prints the contents. It can also be used to time how long it takes to read a given number of messages from a queue. It demonstrates the configuration file, the MQRC_NO_MSG_AVAILABLE constant, and the use of the MsgId and CorrelId message descriptor fields. Source code included. Freeware. Author: Fiendish.
download file 0.04 2005/01 Rfh2Put is a sample C program that puts messages to a message queue. Message contains RFH2 header. Source code included. Freeware. Author: unknown.
download file 0.01 2014/05 SendCmdTozOS is a sample C program that sends an MQSC command to a z/OS queue manager. Source code included. Freeware. Author: Roger Lacroix
download file 0.01 2001/01 SLLoadMQ demonstrates the use of dynamic load of MQSeries on AIX. Source code included. Freeware. Author: IBM.
download file 0.01 2001/01 SunLoadMQ demonstrates the use of dynamic load of MQSeries on Oracle Solaris. Source code included. Freeware. Author: IBM.
download file 0.01 2017/06 test_mqconnu and test_mqconnux demonstrate the use of the MQCONNU and MQCONNUX MQ API calls. Source code included. Freeware. Author: Roger Lacroix.
download file 0.01 1998/07 Write_To_Oracle is a program that is started by a trigger manager. It gets messages from a queue and inserts them into a hypothetical Oracle table, each message being representing as a row in the table. It demonstrates the configuration file, the MQSET call to disable and re-enable triggering, the MQCMIT and MQBACK calls for unit of work control, how to wait for messages, and how to mix embedded SQL and MQI calls in the same program. Source code included. Freeware. Author: Fiendish.
download file 0.01 1998/07 Write_To_Queue is a program that reads an ASCII file, line by line, turning each line into an MQSeries message. Each message is put onto the same queue. It demonstrates how to connect to a queue manager, open a queue, and put messages on a queue using the MQPUT call, and collect any replies generated. It uses the synchronous reply approach for simplicity. Source code included. Freeware. Author: Fiendish.
download file 0.01 2001/09 XA_MQS_DB2 demonstrates how to use MQ and DB2 in a distributed transaction. MQ queue manager serves as a TX transaction manager and as an XA resource manager, while DB2 DBMS serves as an XA resource manager only. MQI API is used to access MQSeries, and CLI API is used to access DB2. Source code included. Freeware. Author: Predrag Maksimovic.
download file 0.01 2006/01 XA_MQS_Oracle demonstrates how to use MQ and Oracle in a distributed transaction. MQ queue manager serves as a TX transaction manager and as an XA resource manager, while Oracle DBMS serves as an XA resource manager only. MQI API is used to access MQSeries, and CLI API is used to access DB2. Source code included. Freeware. Author: Predrag Maksimovic. Updated by Rick Tsujimoto.

IBM MQ C Exit Code Samples

File Size Date Description
download file 0.01 2002/06 API Exit Count Messages is the sample API Exit code to count MQ message operations. Source code included. Freeware. Author: Mark E Taylor of IBM.
download file 1.2 2015/03 BlockIP2 is a C MQ exit designed to block the incoming channel connection based on certain criteria like UserID and IP address. Source code included. Freeware. Author: Jorgen Pedersen.
download file 0.01 2002/09 ClientExit is a C MQ Client Channel Security exit. Source code included. Freeware. Author: Marty Frasier of IBM.
download file 0.01 2001/09 CryptExit is a C program from the IBM redbook id SG24-5306. This provides the functionality for connecting channels to authentic with each other and pass messages between queue managers in encrypted form using RSA. A precompiled DLL for NT is included, but this code can be easily ported to UNIX and mainframe as described in the redbook. Source code included. Freeware. Author: IBM (Updated by Tibor).
download file 0.01 2001/09 MQChlCli is a C channel receive exit that can be use for debugging purpose. Source code included. Freeware. Author: Michel Jalette.

 

 

Warning: Please backup all data before using of any or all of the programs found on this web site. Capitalware, or the original authors of any of these programs will be NOT be held responsible for any damage to data or programs.