FreeKB - define qlocal command
IBM MQ - define qlocal command

If you are not sure what an MQ queue is, check out our Getting Started tutorial. These examples are based on Linux. Switch to the mqm user.

su - mqm


Start the MQSC utility for the queue manager that contains the queue you want to delete. In this example, MANAGER01 is the name of the queue manager. This assumes that the "mqm" users .bash_profile has been updated to have PATH=$PATH:<root installation directory>/bin.

The define qlocal command is used to create a local queue. The define qremote command is used to create a remote queue. In this example, the local queue QUEUE01 is deleted.

echo "define qlocal ('QUEUE01')" | runmqsc MANAGER01


The following should be displayed.

AMQ8006I: IBM MQ queue created.


Often, additional options are configured as part of the queue creation, such as maxdepth and to enable get and put.

echo "define qlocal(QUEUE01) maxdepth (5000) get (ENABLED) put (ENABLED)" | runmqsc MANAGER01


Add a Comment

We will never share your name or email with anyone. Enter your email if you would like to be notified when we respond to your comment.

Please enter a9965 in the box below so that we can be sure you are a human.