dmpmqmsg sample use for daily basis

✅ Basic One-Liner: Dump messages non-destructively (browse only)

dmpmqmsg -m MYQMGR -i MY.QUEUE -b

  • -m MYQMGR: Queue manager name
  • -i MY.QUEUE: Input queue
  • -b: Browse mode (non-destructive)

✅ Destructive Read (messages will be removed)

dmpmqmsg -m MYQMGR -i MY.QUEUE

  • This will read and remove messages from the queue.

✅ Dump to a File (for later restore)

dmpmqmsg -m MYQMGR -i MY.QUEUE -f dump.mq

  • Dumps messages to a binary file dump.mq
  • Useful for backups or moving messages between environments

✅ Dump from file back to queue

dmpmqmsg -m MYQMGR -o MY.QUEUE -f dump.mq

✅ Extract just message payloads (text) in one line

dmpmqmsg -m MYQMGR -i MY.QUEUE -b | grep "DATA:"

Or more selectively:

dmpmqmsg -m MYQMGR -i MY.QUEUE -b | awk '/DATA:/{print $0}'

Related Posts

Leave a Reply

Your email address will not be published. Required fields are marked *