Putting a test message on the queue

Put a test message on a remote queue using only the MQSC command-line interface.

Before you begin

Before putting a test message on the queue, you must already have completed the following tasks in this tutorial:

About this task

Perform this task on the sending machine (the machine that hosts the queue manager QM_ORANGE).

The amqsput sample program is used to put a message onto the queue that you created:
  • [Windows]On Windows, the sample programs are installed by default with IBM® MQ Server or Client.
  • [Linux]On Linux®, the samples programs RPM need to be installed.

Procedure

  1. Open a command prompt.
  2. Start the amqsput sample program as follows:
    • [Windows]On Windows, type the command:
      
      amqsput Q1 QM_ORANGE
      
    • [Linux]On Linux, change to the /opt/mqm/samp/bin directory and type the command:
      
       ./amqsput Q1 QM_ORANGE
      
    The following messages are displayed:
    Sample amqsput0 start
    target queue is Q1
  3. Type some message text on one or more lines, then press Enter twice.
    The following message is displayed:
    Sample amqsput0 end

Results

You have now created a test message and put it onto the remote queue. The next task is to verify that the test message was received.