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

  1. Run imqsputs queue-name.
  2. Type in lines at the console, which are placed with WebSphere(R) MQ as messages.
  3. Enter a null line to end the input.
  4. Run imqsgets queue-name to retrieve all the lines and display them at the console.

On z/OS

  1. Construct and run a batch job using the sample JCL imqsputr. The messages are read from the SYSIN data set.
  2. 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: