Raj
Raj

Reputation: 31

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.

Upvotes: 2

Views: 3602

Answers (2)

Raj
Raj

Reputation: 31

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.

Upvotes: 1

T.Rob
T.Rob

Reputation: 31852

Short answer - no.

The easiest thing to do would be to customize some of the sample programs such as amqsget.c to do what you want. Peeling off one message at a time to a file is a rather specialized requirement and not a function the various SupportPacs currently perform.

Upvotes: 0

Related Questions