Defining a local queue

For an application, the local queue manager is the queue manager to which the application is connected. Queues that are managed by the local queue manager are said to be local to that queue manager.

Use the command CRTMQMQ QTYPE *LCL to create a definition of a local queue and also to create the data structure that is called a queue. We can also modify the queue characteristics from those of the default local queue.

In this example, the queue we define, ORANGE.LOCAL.QUEUE, is specified to have these characteristics:

The following command does this on the default queue manager:

CRTMQMQ QNAME('orange.local.queue') QTYPE(*LCL)
       TEXT('Queue for messages from other systems')
       PUTENBL(*NO)
       GETENBL(*YES)
       TRGENBL(*NO)
       MSGDLYSEQ(*FIFO)
       MAXDEPTH(1000)
       MAXMSGLEN(2000)
       USAGE(*NORMAL)

Notes:

  1. USAGE *NORMAL indicates that this queue is not a transmission queue.

  2. If you already have a local queue on the same queue manager with the name orange.local.queue, this command fails. Use the REPLACE *YES attribute, if you want to overwrite the existing definition of a queue, but see also Changing local queue attributes.