Examples of using the dmpmqmsg utility
Simple ways in which we can use the dmpmqmsg utility (formerly qload). This utility is incorporated into the product from Version 8.0.
Formerly the qload utility was available as SupportPac MO03.
Unload a queue to a file
Use the following options on the command line to save the messages that are on a queue, into a file:dmpmqmsg -m QM1 -i Q1 -f c:\myfileThis command takes a copy of the messages from the queue and saves them in the file specified.
Unload a queue to a series of files
We can unload a queue to a series of files by using an insert character in the file name. In this mode each message is written to a new file:dmpmqmsg -m QM1 -i Q1 -f c:\myfile%nThis command unloads the queue to files, myfile1, myfile2, myfile3, and so on.
Load a queue from a file
To reload a queue with the messages you saved in Unload a queue to a file, use the following options on the command line:dmpmqmsg -m QM1 -o Q1 -f c:\myfile%nThis command unloads the queue to files, myfile1, myfile2, myfile3, and so on.
Load a queue from a series of files
We can load a queue from a series of files by using an insert character in the file name. In this mode each message is written to a new file:dmpmqmsg -m QM1 -o Q1 -f c:\myfile%nThis command loads the queue to files, myfile1, myfile2, myfile3, and so on.
Copy the messages from one queue to another queue
Replace the file parameter in Unload a queue to a file, with another queue name and use the following options:dmpmqmsg -m QM1 -i Q1 -o Q2This command allows the messages from one queue to be copied to another queue.
Copy the first 100 messages from one queue to another queue
Use the command in the previous example and add the -r#10 option:dmpmqmsg -m QM1 -i Q1 -o Q2 -r#10
Move the messages from one queue to another queue
A variation on Load a queue from a file. Note the distinction between using -i (lowercase) which only browses a queue, and -I (uppercase) which destructively gets from a queue:dmpmqmsg -m QM1 -I Q1 -o Q2
Move messages older than one day from one queue to another queue
This example shows the use of age selection. Messages can be selected that are older than, younger than, or within a range of ages.dmpmqmsg -m QM1 -I Q1 -o Q2 -T1440
Display the ages of messages currently on a queue
Use the following options on the command line:dmpmqmsg -m QM1 -i Q1 -f stdout -dT
Work with the message file
Having unloaded the message from your queue, as in Unload a queue to a file, you might want to edit the file.
We might also want to change the format of the file to use one of the display options that you did not specify at the time you unloaded the queue.
We can use the dmpmqmsg utility to reprocess the file into the required format even after the unload of the queue has taken place. Use the following options on the command line.dmpmqmsg -f c:\oldfile -f c:\newfile -dA
See dmpmqmsg for a description of the command and its parameters.
Parent topic: Use the dmpmqmsg utility between two systems