C language examples
This collection of topics is mostly taken from the IBM MQ for z/OS sample applications. They are applicable to all platforms, except where noted.
- Connect to a queue manager
This example demonstrates how to use the MQCONN call to connect a program to a queue manager in z/OS batch. - Disconnect from a queue manager
This example demonstrates how to use the MQDISC call to disconnect a program from a queue manager in z/OS batch. - Create a dynamic queue
This example demonstrates how to use the MQOPEN call to create a dynamic queue. - Opening an existing queue
This example demonstrates how to use the MQOPEN call to open a queue that has already been defined. - Closing a queue
This example demonstrates how to use the MQCLOSE call to close a queue. - Put a message using MQPUT
This example demonstrates how to use the MQPUT call to put a message on a queue. - Put a message using MQPUT1
This example demonstrates how to use the MQPUT1 call to open a queue, put a single message on the queue, then close the queue. - Getting a message
This example demonstrates how to use the MQGET call to remove a message from a queue. - Getting a message using the wait option
This example demonstrates how to use the wait option of the MQGET call. - Getting a message using signaling
- Inquiring about the attributes of an object
This example demonstrates how to use the MQINQ call to inquire about the attributes of a queue. - Set the attributes of a queue
This example demonstrates how to use the MQSET call to change the attributes of a queue. - Retrieving status information with MQSTAT
This example demonstrates how to issue an asynchronous MQPUT and retrieve the status information with MQSTAT.
Parent topic: Code examples