Create a queue called LQ1
Create a queue by using the command-line interface. Queues are data structures that are used to store messages and are IBM MQ queue manager objects.
There are three ways to create IBM MQ objects:
- Command-line.
- IBM MQ Explorer.
- Use a programmable interface.
In this task we can create IBM MQ objects using the command-line.
The command-line interface has a scripting language called IBM 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
-
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, 2020. ALL RIGHTS RESERVED. Starting MQSC for queue manager QM1.
The tool is ready to accept MQSC commands. -
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: IBM MQ queue created.
-
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 Put a message to the queue LQ1.
Parent topic: Installing and configuring using the command line interface