A typical use of the MOVE QLOCAL command is to move messages from a private
queue to a shared queue when you are setting up a queue-sharing group environment.
The MOVE QLOCAL command moves messages; it
does not copy them.
The MOVE QLOCAL command moves messages in a similar way to an application
performing successive MQGET and MQPUT calls. However, the MOVE QLOCAL command
does not physically delete logically-expired messages and, therefore, no expiration
reports are generated.
The priority, context, and persistence of each message are not changed.
The command performs no data conversion and calls no exits.
Confirm-on-delivery (COD) report messages are not generated but confirm-on-arrival
(COA) report messages are. This means that more than one COA report message
can be generated for a message.
The MOVE QLOCAL command transfers the messages in batches. At COMMIT
time, if the trigger conditions are met, trigger messages are produced. This
might be at the end of the move operation.
Note:
Before the transfer
of messages begins, this command verifies that the number of messages on the
source queue, when added to the number of messages on the target queue, does
not exceed MAXDEPTH on the target queue.
If the MAXDEPTH of the target
queue were to be exceeded, no messages are moved.
The MOVE QLOCAL command can change the sequence in which messages can
be retrieved. The sequence remains unchanged only if:
You specify TYPE(MOVE) and
The MSGDLVSQ parameter of the source and target queues is the same.
Messages are moved within one or more syncpoints. The number of messages
in each syncpoint is determined by the queue manager.
If anything prevents the moving of one or more messages, the command stops
processing. This can mean that some messages have already been moved, while
others remain on the source queue. Some of the reasons that prevent a message
being moved are:
The target queue is full.
The message is too long for the target queue.
The message is persistent, but the target queue cannot store persistent
messages.