Skip to main content

 
IBM PartnerWorld  >  Technical  >  Downloads and drivers

Downloads and drivers

 

Sample code


WebSphere MQ samples
The following sample code was created by PartnerWorld developer technical support. Each of these samples is provided to you on an "AS IS" basis, without warranty of any kind.

To find other sources of sample code, return to the sample code page.

General samples Java™ / JMS samples Workflow samples

WebSphere MQ general sample code
mirrorq_linux.tar.gz API exit to make a copy of all messages put to a queue on Linux
mirrorq1_win.zip API exit to make a copy of all messages put to a queue on Windows
mirrorq_aix.tar.Z API exit to make a copy of all messages put to a queue on AIX
mirrorq_sun.tar.Z API exit to make a copy of all messages put to a queue on Sun Solaris
mirrorq_hp.tar.Z API exit to make a copy of all messages put to a queue on HP
mqreq.cpp C++ requestor program that manipulates message and correlation IDs
mqsrv.cpp C++ server program that manipulates message and correlation IDs
corrid.cpp C++ use of correlation ID
backout.c C program to backout a poison message
sunloadmq.c Dynamic load of MQSeries on Sun Solaris
ntloadmq.c Dynamic load of MQSeries on Windows NT
getgroup.c Gets messages in a group from message queue
putgroup.c Puts messages in a group to a message queue
srvpcf.cpp PCF example program
namelist.c Use of MQINQ to display properties of a namelist
mqsync.c Demonstration of syncpoint with MQSeries in C
mqsync.cpp Demonstration of syncpoint with MQSeries in C++
qstatus.c How to query QSTATUS using the MQAI interface
mqsrvro.cpp Illustrates how to set message ID and correlation ID based on report options
mqreqro.cpp Illustrates how to request message ID and correlation ID using report options
imsbridge.cpp Illustrates how the imqIMSBridge class can be used to put a message to an IMS Bridge queue
mqadhoc.c CLI program demonstrates using WebSphere MQ as an XA resource coordinator with DB2 UDB Version 7.2
mqdb2.sqc Embedded SQL program demonstrates using WebSphere MQ as an XA resource coordinator with DB2 UDB Version 7.2
jsmqput.c Puts messages on a message queue in the format similar to messages generated by an MQ Java/JMS application
mirrorq.zip Shows one implementation for replicating messages on a queue to a mirror queue
mqthrds.c Use of multiple threads to do MQSeries calls (Sun Solaris only)
mqthrdnt.c Use of multiple threads to do MQSeries calls (Windows NT only)
mqthrda.c Use of multiple threads to do MQSeries calls (AIX only)
slloadmq.c Dynamic load of MQSeries on AIX

WebSphere MQ Java/JMS sample code
mqreqro.java Illustrates how to request message ID and correlation ID using report options
mqsrvro.java Illustrates how to set message ID and correlation ID based on report options
ResetQStats.java Show reset queue statistics command
mqjmsreq.java Acts as a JMS requester to a server program
mqjmssrv.java Acts as a JMS server sending replies back to a requester program
mqsyncjms.java Shows JMS syncpointing of messages during put requests
mqhash.java Use of Java hash table for setting MQSeries environment
MQSetMsgId.java Sets MessageID and CorrelationID of a message using Java code
CorrelExample.java JMS sample to show use of correlation IDs with message selectors
getGroup.java Demonstrates getting messages that are in a message group
putGroup.java Demonstrates putting messages that are in a message group
backout.java Backout a poison message
MSender.java Sends input from the keyboard to a queue
mqsync.java Demonstration of syncpoint with MQSeries in Java
mqjmspub.java Using JMS to perform the role of publisher in a publish/subscribe environment
mqjmssub.java Using JMS to perform the role of subscriber in a publish/subscribe environment
mqjmsusr.java Setting user folder properties with JMS
JavaTrigger.java Shows how to implement a Java trigger application
mqjmssel.java JMS usage of message selectors to retrieve messages
amqsbcg.java Illustrates how to browse message contents and descriptor
MqJmsProp.java Displays ConnectionMetaData for the JMS provider
mqdb2log.java MQSeries base Java and DB2 JDBC two-phase commit
imsbridge.java Illustrates how to format a message for the IMSBridge
Unsubscribe.java Shows how orphaned subscription registrations can be removed from the Pub/Sub broker (SupportPac ma0c)
dumpbroker.java Shows how pcf messages can be sent to the MQSeries Pub/Sub broker (SupportPac ma0c) query the active list of subscriptions
JmsIMSBridge.java Illustrates how to format a message for the IMS Bridge
mqbrowse.java Demonstration of browsing/getting messages with Java code
mqjmsro.java MQSeries JMS sample setting MQMD report options
WSMQSample.zip Shows the interaction between a thin client, servlet and message queue

WebSphere MQ Workflow sample code
StartProcessJMS.java Shows creating and starting a MQSeries Workflow process
StartCreditRequest.java Starts the sample CreditRequest process asynchronously from a Java application using XML
sampgicm.c Get and set a specific container member from within an activity
sampwrkl.c Retrieves worklists and workitems for the logged on user, and allows the user to select a workitem to start
startproc.c C program to start MQSeries Workflow process, passing in data

 
Membership

Join PartnerWorld

Sign in required

Go to member resources

Need assistance?