Search code examples
queueibm-mqmessage

Save MQ Queue messages to separate files


I am using q program to read messages from a MQ queue and write them to a file. But, is there any way I can save each message into a separate file along with RFH header using q instead of writing to one large file?

q -iInputQueue > OutputFile.txt

I searched for options in q manual but couldn't get one.


Solution

  • Thanks for looking in to this. I found the RFHUtil supportpac provides this functionality. Download it from IBM website. The binaries are provided for AIX in a separate folder.

    Use the program mqcapture program and pass the parmcapt.txt file with the right settings to save each message in a separate file.

    That works good.