Bootstrap FreeKB - IBM MQ - Create local queue using the define qlocal command
IBM MQ - Create local queue using the define qlocal command

Updated:   |  IBM MQ articles

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

The define qlocal command is used to create a local queue, not a remote queue. The define qremote command is used to create a remote queue. In this example, the local queue named QUEUE01 is created on the queue manager named MANAGER01.

AVOID TROUBLE

When a value is a string and contains one or more white spaces or special characters, the value must be wrapped in quotes. In this example, QUEUE01 does not need to be wrapped in quotes because QUEUE01 does not contain any white space or special characters. But, it is always OK to wrap a string in quotes if you perfer.

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.

AVOID TROUBLE

When a value is an integer, the value must NOT be wrapped in quotes. In this example, 5000 is not wrapped in quotes.

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

 




Did you find this article helpful?

If so, consider buying me a coffee over at Buy Me A Coffee



Comments


Add a Comment


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