ASG
IBM
Zystems
Cressida
Icon
Netflexity
 
  MQSeries.net
Search  Search       Tech Exchange      Education      Certifications      Library      Info Center      SupportPacs      LinkedIn  Search  Search                                                                   FAQ  FAQ   Usergroups  Usergroups
 
Register  ::  Log in Log in to check your private messages
 
RSS Feed - WebSphere MQ Support RSS Feed - Message Broker Support

MQSeries.net Forum Index » General IBM MQ Support » How to offload messages to different files using Qload

Post new topic  Reply to topic
 How to offload messages to different files using Qload « View previous topic :: View next topic » 
Author Message
Mitra
PostPosted: Wed Oct 08, 2014 6:11 am    Post subject: How to offload messages to different files using Qload Reply with quote

Voyager

Joined: 21 Mar 2011
Posts: 78

Hi,


I am trying to offload messages from a queue using qload. I am able to offload all messages to a file or each message to a seperate file. But I would like to specify a number so that the qload had to offload that number of messages into each file.

Eg: If a Queue had 100k messages I want to offload messages of 10k each into different files using qload with out damaging the message data.

Please help

Thanks,
Mitra
Back to top
View user's profile Send private message
JosephGramig
PostPosted: Wed Oct 08, 2014 7:13 am    Post subject: Reply with quote

Grand Master

Joined: 09 Feb 2006
Posts: 1244
Location: Gold Coast of Florida, USA

Did you try the -r option?

like -r#100

with your other options?
Back to top
View user's profile Send private message AIM Address
Mitra
PostPosted: Wed Oct 08, 2014 7:51 am    Post subject: Reply with quote

Voyager

Joined: 21 Mar 2011
Posts: 78

JosephGramig wrote:
Did you try the -r option?

like -r#100

with your other options?



Yes, I tried but still it's offloading each message into diff file not based on the number specified in -r option

./qload_linux -m QMGR -i QUEUENAME -r#1000 -f /var/mqm/tMP/myfile%n

This is how I am using.
Back to top
View user's profile Send private message
PaulClarke
PostPosted: Wed Oct 08, 2014 8:09 am    Post subject: Reply with quote

Grand Master

Joined: 17 Nov 2005
Posts: 1002
Location: New Zealand

Hi,

I'm afraid, as far as I can remember, QLOAD doesn't have an option to write a subset to each file. You can choose either to offload all messages to a file or have each message offloaded into a separate file. This does sound like a reasonable additional feature though.

I think your best bet, with the code as it stands, is to issue QLOAD multiple times. Once for each range of messages you are interested in and specifying a different file. So, in your example you could run it 10 times. First specifying the first 10K messages, then the next 10K messages etc etc.

Cheers,
Paul.
_________________
Paul Clarke
MQGem Software
www.mqgem.com
Back to top
View user's profile Send private message Visit poster's website
Mitra
PostPosted: Wed Oct 08, 2014 8:44 am    Post subject: Reply with quote

Voyager

Joined: 21 Mar 2011
Posts: 78

PaulClarke wrote:
Hi,

I'm afraid, as far as I can remember, QLOAD doesn't have an option to write a subset to each file. You can choose either to offload all messages to a file or have each message offloaded into a separate file. This does sound like a reasonable additional feature though.

I think your best bet, with the code as it stands, is to issue QLOAD multiple times. Once for each range of messages you are interested in and specifying a different file. So, in your example you could run it 10 times. First specifying the first 10K messages, then the next 10K messages etc etc.

Cheers,
Paul.



Hi Paul,

We even tried it it didn't work as expected for the queue that is in use.

qload -m $QM -I $Q -f $CURRENTFILE -r#10000 -t 10000

This is what we used and we ended up with many files of diffrent sizes with messages ranging from 1 to 10k.


Thanks,
Mitra
Back to top
View user's profile Send private message
tczielke
PostPosted: Wed Oct 08, 2014 8:55 am    Post subject: Reply with quote

Guardian

Joined: 08 Jul 2010
Posts: 941
Location: Illinois, USA

If you are familiar with Linux scripting, one option would be to put all the records to one file, and the use tail (or the appropriate command) to break that file into multiple files. I know I have done that in the past, and it wasn't too hard.
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic  Reply to topic Page 1 of 1

MQSeries.net Forum Index » General IBM MQ Support » How to offload messages to different files using Qload
Jump to:  



You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
Protected by Anti-Spam ACP
 
 


Theme by Dustin Baccetti
Powered by phpBB © 2001, 2002 phpBB Group

Copyright © MQSeries.net. All rights reserved.