Geekflare is supported by our audience. We may earn affiliate commissions from buying links on this site.
Share on:

Copy message from one queue to another – IBM MQ

copy transfer
Invicti Web Application Security Scanner – the only solution that delivers automatic verification of vulnerabilities with Proof-Based Scanning™.

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.

Thanks to our Sponsors
More great readings on WebSphere
Power Your Business
Some of the tools and services to help your business grow.
  • Invicti uses the Proof-Based Scanning™ to automatically verify the identified vulnerabilities and generate actionable results within just hours.
    Try Invicti
  • Web scraping, residential proxy, proxy manager, web unlocker, search engine crawler, and all you need to collect web data.
    Try Brightdata
  • Semrush is an all-in-one digital marketing solution with more than 50 tools in SEO, social media, and content marketing.
    Try Semrush
  • Intruder is an online vulnerability scanner that finds cyber security weaknesses in your infrastructure, to avoid costly data breaches.
    Try Intruder