Sample programs SPUT (imqsput.cpp) and SGET (imqsget.cpp)
These programs place messages to, and retrieve messages from, a named queue.
On all platforms except z/OS
- Run imqsputs queue-name.
- Type in lines at the console, which are placed with WebSphere(R) MQ as messages.
- Enter a null line to end the input.
- Run imqsgets queue-name to retrieve all
the lines and display them at the console.
On z/OS
- Construct and run a batch job using the sample JCL imqsputr. The messages are read from the SYSIN data set.
- Construct and run a batch job using the sample JCL imqsgetr. The messages are retrieved from the queue and sent to the SYSPRINT
data set.
See Running sample programs on z/OS for more information.
These samples show the use of the following classes: