(We need to download IBM MQ support pack named “MO03” to perform the below task)
Step 1: Let us assume we have a QMGR named QM1 & 2 queues named LQ1 and LQ2
Step 2: Backup messages from a Queue to a file:
Command: qload –m QM1 –i LQ1 –f c:\bkpmsg
Step 3: import messages from a file to the queue:
Command: qload –m QM1 –o LQ1 –f c:\bkpmsg
Step 4: Copying messages from a queue to another queue:
Command: qload –m QM1 –i LQ1 –o LQ2
Step 5: Copying certain number of messages from a queue to another queue:
(e.g) we need to copy first 20 messages from a LQ1 to LQ2
Command: qload –m QM1 –i LQ1 –o LQ2 –r#20
“-r” Parameter:
x = Process x messages only
x..y = Process messages between x and y
X#y = Process messages from x to y count
#y = Process first y count of messages (just like in e.g)
Step 6: Move entire message from a queue to another queue:
Command: qload –m QM1 –i LQ1 –o LQ2
Comments
dmpmqmsg -m QMGR NAME -i QUEUE NAME -f
For Linux box
-----------
go to opt/MQM/bin
And execute the above command..