Home

 

Copy a local queue definition

 

+

Search Tips   |   Advanced Search

 

To copy a queue definition use the LIKE attribute on the DEFINE command...

DEFINE QLOCAL (MAGENTA.QUEUE) + 
LIKE (ORANGE.LOCAL.QUEUE);

This command creates a queue with the same attributes as the original queue...

 ORANGE.LOCAL.QUEUE 

...rather than those of the system default local queue. Enter the name of the queue to be copied exactly as it was entered when you created the queue. If the name contains lower case characters, enclose the name in single quotation marks.

We can also use this form of the DEFINE command to copy a queue definition, but substitute one or more changes to the attributes of the original. For example:

DEFINE QLOCAL (THIRD.QUEUE) +
       LIKE (ORANGE.LOCAL.QUEUE) +
       MAXMSGL(1024);

This command copies the attributes of the queue ORANGE.LOCAL.QUEUE to the queue THIRD.QUEUE, but specifies that the maximum message length on the new queue is to be 1024 bytes, rather than 4194304.

  1. When you use the LIKE attribute on a DEFINE command, you are copying the queue attributes only. You are not copying the messages on the queue.

  2. If you a define a local queue, without specifying LIKE, it is the same as...

     DEFINE LIKE(SYSTEM.DEFAULT.LOCAL.QUEUE)
    

 

Parent topic:

Work with local queues

 

Home