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 » Deleting messages based on their length.

Post new topic  Reply to topic
 Deleting messages based on their length. « View previous topic :: View next topic » 
Author Message
marella123
PostPosted: Mon Apr 24, 2017 8:03 am    Post subject: Deleting messages based on their length. Reply with quote

Newbie

Joined: 02 Apr 2015
Posts: 5

Hi experts,

I have 1000 messages in the queue and needs to purge the messages which size was "zero" and I can see the different length of messages in the queue so can someone please give a command/process to delete the same.

Thanks in advance.
Back to top
View user's profile Send private message
Vitor
PostPosted: Mon Apr 24, 2017 9:50 am    Post subject: Reply with quote

Grand High Poobah

Joined: 11 Nov 2005
Posts: 26093
Location: Texas, USA

Unload the messages into a file.
Remove the blank lines.
Reload the messages from the file.
_________________
Honesty is the best policy.
Insanity is the best defence.
Back to top
View user's profile Send private message
PaulClarke
PostPosted: Mon Apr 24, 2017 3:10 pm    Post subject: Reply with quote

Grand Master

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

QLOAD can do this. You can remove the zero length messages with the simple command
Code:
qload -IMYQUEUE -z0,1

Cheers,
Paul.
_________________
Paul Clarke
MQGem Software
www.mqgem.com
Back to top
View user's profile Send private message Visit poster's website
marella123
PostPosted: Tue Apr 25, 2017 8:10 am    Post subject: Reply with quote

Newbie

Joined: 02 Apr 2015
Posts: 5

Hi Paul,

Thanks for the response.

that qload command is not working, can you please advise me on this.

Thanks in advance
Back to top
View user's profile Send private message
PaulClarke
PostPosted: Tue Apr 25, 2017 10:25 am    Post subject: Reply with quote

Grand Master

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

Not without you telling me what happens no. If ever you ask a question on this forum (or indeed any other forum) it is always best to try and include as much information as possible. Just saying 'it does not work' is of little use.

Regards,
Paul.
_________________
Paul Clarke
MQGem Software
www.mqgem.com
Back to top
View user's profile Send private message Visit poster's website
Vitor
PostPosted: Tue Apr 25, 2017 11:32 am    Post subject: Reply with quote

Grand High Poobah

Joined: 11 Nov 2005
Posts: 26093
Location: Texas, USA

marella123 wrote:
that qload command is not working, can you please advise me on this.


I agree with my associate that "it's not working" is about as unhelpful a thing as you can respond.

If I extrapolate correctly, and assume the most idiotic mistake, you mean it's not working at all. This is because qload is not a command, but a commonly used utility you'll need to install if you don't have it.
_________________
Honesty is the best policy.
Insanity is the best defence.
Back to top
View user's profile Send private message
zpat
PostPosted: Tue Apr 25, 2017 10:33 pm    Post subject: Reply with quote

Jedi Council

Joined: 19 May 2001
Posts: 5849
Location: UK

You may need to run QLOAD in client mode, if you don't run it on the same host as the QM, or you may need to specify the QM name if it's not the default QM.

I assume this also works with dmpmqmsg?
_________________
Well, I don't think there is any question about it. It can only be attributable to human error. This sort of thing has cropped up before, and it has always been due to human error.
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 » Deleting messages based on their length.
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.