Changing local queue attributes with ALTER QLOCAL or DEFINE QLOCAL

You can change queue attributes in two ways, by using either the ALTER QLOCAL command or the DEFINE QLOCAL command with the REPLACE attribute.

About this task

You can use the REPLACE attribute of either the ALTER and DEFINE command to replace an existing definition with the specified new definition. The difference between using ALTER and DEFINE is that ALTER with REPLACE does not change unspecified parameters, but DEFINE with REPLACE sets all the parameters.

Procedure

To change queue attributes, use either the ALTER command or the DEFINE command as shown in the following examples.
In these examples, the maximum message length on the queue ORANGE.LOCAL.QUEUE is decreased to 10,000 bytes.
  • Using the ALTER command:
    
    ALTER QLOCAL (ORANGE.LOCAL.QUEUE) MAXMSGL(10000)
    
    This command changes a single attribute, that of the maximum message length; all the other attributes remain the same.
  • Using the DEFINE command with the REPLACE option, for example:
    
    DEFINE QLOCAL (ORANGE.LOCAL.QUEUE) MAXMSGL(10000) REPLACE
    
    This command changes not only the maximum message length, but also all the other attributes, which are given their default values. So, for example, if the queue was previously put inhibited, this is changed to put enabled because put enabled is the default, as specified by the queue SYSTEM.DEFAULT.LOCAL.QUEUE.

    If you decrease the maximum message length on an existing queue, existing messages are not affected. Any new messages, however, must meet the new criteria.