In WebSphere Last updated:
Share on:
Cloudways offers managed cloud hosting for any size business to host a website or complex web applications.

Working as an MQ administrator, you may often have to copy the messages from one queue to another queue for troubleshooting.

Use dmpmqmsg to copy MQ message

Copying messages from one queue to another is possible with an inbuilt program called dmpmqmsg in IBM MQ8. In this article, I will explain how to do so.

Scenario – copy a message from LOCAL.Q1 to LOCAL.Q2 in CHANDAN.QMGR

I have one message in LOCAL.Q1 now

dis ql(LOCAL.Q1) curdepth
1 : dis ql(LOCAL.Q1) curdepth
AMQ8409: Display Queue details.
   QUEUE(LOCAL.Q1)                         TYPE(QLOCAL)

To copy, I will use dmpmqmsg program.

-bash-4.2$ ./dmpmqmsg -m CHANDAN.QMGR -i LOCAL.Q1 -o LOCAL.Q2

5724-H72 (C) Copyright IBM Corp. 1994, 2015.
WebSphere MQ Queue Load/Unload Utility
Read   - Files: 0 Messages:     1 Bytes:       39
Written - Files:   0 Messages:     1 Bytes:       39

The message is copied from LOCAL.Q1 to LOCAL.Q2.

Let’s verify them.

dis ql(LOCAL.Q2) curdepth
     1 : dis ql(LOCAL.Q2) curdepth
AMQ8409: Display Queue details.
   QUEUE(LOCAL.Q2)                         TYPE(QLOCAL)

So you see the message is copied to LOCAL.Q2 now.

Share on:
  • Chandan Kumar
    Chandan Kumar is the founder of Geekflare. He’s helped millions to excel in the digital realm. Passionate about technology, He’s on a mission to explore the world and amplify growth for professionals and businesses.

Thanks to our Sponsors

More great readings on WebSphere

Power Your Business

Some of the tools and services to help your business grow.
  • The text-to-speech tool that uses AI to generate realistic human-like voices.

    Try Murf AI
  • Web scraping, residential proxy, proxy manager, web unlocker, search engine crawler, and all you need to collect web data.

    Try Brightdata
  • is an all-in-one work OS to help you manage projects, tasks, work, sales, CRM, operations, workflows, and more.

    Try Monday
  • Intruder is an online vulnerability scanner that finds cyber security weaknesses in your infrastructure, to avoid costly data breaches.

    Try Intruder