Creating a queue called LQ1

Create a queue for use with the Getting started with WebSphere IBM® WebSphere® MQ Version 7.5 scenario, by using either the command-line interface or the WebSphere MQ Explorer. Queues are data structures that are used to store messages and are IBM WebSphere MQ queue manager objects.

About this task

There are three ways to create IBM WebSphere MQ objects:

  • Command-line.
  • IBM WebSphere MQ Explorer.
  • Using a programmable interface.

In this task you can create IBM WebSphere MQ objects using the command-line or the IBM WebSphere MQ Explorer.

Creating a queue by using the command-line interface

The command-line interface has a scripting language called IBM WebSphere MQ Script Commands (MQSC). The scripting tool, runmqsc, is used to run the script against a queue manager. To create and start a queue by using the command-line interface, complete the following steps:

Procedure

  1. Start the scripting tool by typing the following command:
    runmqsc QM1
    When the scripting tool starts, the following output is displayed:
    C:\>runmqsc QM1
    5724-H72 (C) Copyright IBM Corp. 1994, 2025. ALL RIGHTS RESERVED.
    Starting MQSC for queue manager QM1.
    The tool is ready to accept MQSC commands.
  2. Create a local queue called LQ1 by typing the following MQSC command:
    define qlocal(LQ1)
    When the queue is created, the following output is displayed:
    define qlocal(LQ1)
         2 : define qlocal(LQ1)
    AMQ8006: WebSphere MQ queue created.
  3. Stop the scripting tool by typing the following MQSC command:
    end
    When the scripting tool ends, the following output is displayed:
    One MQSC command read.
    No commands have a syntax error.
    All valid MQSC commands were processed.
    
    C:\>

What to do next

You are ready to put a message on to your queue. To put a message in a queue, see Putting a message to the queue LQ1.

Creating a queue by using WebSphere MQ Explorer

To create and start a queue by using the WebSphere MQ Explorer, complete the following steps:

Procedure

  1. In the Navigator view, expand the Queue Managers folder.
  2. Expand queue manager QM1.
  3. Right-click the Queues folder, then click New > Local Queue... The New Local Queue wizard starts.
  4. In the Name field, type LQ1.
  5. Click Finish.

    The new queue LQ1, is displayed in the Content view. If the queue is not displayed in the Content view, click on the Refresh button, at the top of the Content view.

What to do next

You are ready to put a message on to your queue. To put a message in a queue, see Putting a message to the queue LQ1.