COBOL examples
This collection of topics is 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 an existing queue. - Closing a queue
This example demonstrates how to use the MQCLOSE call. - Put a message using MQPUT
This example demonstrates how to use the MQPUT call using context. - Put a message using MQPUT1
This example demonstrates how to use the MQPUT1 call. - 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 MQGET call with the wait option and accepting truncated messages. - Getting a message using signaling
This example demonstrates how to use the MQGET call with signaling. This extract is taken from the Credit Check sample application (program CSQ4CVB2) supplied with IBM MQ for z/OS. - 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.
Parent topic: Code examples