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 Chk queue depth using Q Program?

Post new topic  Reply to topic
 how to Chk queue depth using Q Program? « View previous topic :: View next topic » 
Author Message
RRR
PostPosted: Tue Jun 24, 2014 11:48 am    Post subject: how to Chk queue depth using Q Program? Reply with quote

Newbie

Joined: 25 Oct 2010
Posts: 8

Is there any way we can check the queue depth using Q[MA01] Program?
I tried various options, but not able to achieve it. Thanks.
Back to top
View user's profile Send private message
jsware
PostPosted: Tue Jun 24, 2014 12:40 pm    Post subject: Reply with quote

Chevalier

Joined: 17 May 2001
Posts: 455

Why one do:
Display qlocal(MY.QUEUE) curdepth
?
_________________
Regards
John
The pain of low quaility far outlasts the joy of low price.
Back to top
View user's profile Send private message
RRR
PostPosted: Tue Jun 24, 2014 12:54 pm    Post subject: Reply with quote

Newbie

Joined: 25 Oct 2010
Posts: 8

Thanks for the reply jsware.

But my question is how to check the queue depth of a queue using the support pac MA01[Q Program].
Back to top
View user's profile Send private message
zpat
PostPosted: Tue Jun 24, 2014 1:23 pm    Post subject: Reply with quote

Jedi Council

Joined: 19 May 2001
Posts: 5849
Location: UK

My question is why would you want to?

MA01 is essentially an application program. MQ apps should not be aware of queue depth - they should read the queue until empty.
_________________
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
RRR
PostPosted: Tue Jun 24, 2014 1:49 pm    Post subject: Reply with quote

Newbie

Joined: 25 Oct 2010
Posts: 8

I am trying to read the queue and write into a file. If the queue is empty its creating an empty file which i want to avoid.

So, if its possible to check the queue depth, i can do a write to file only if the queue depth is greater than 0.
Back to top
View user's profile Send private message
bruce2359
PostPosted: Tue Jun 24, 2014 2:34 pm    Post subject: Reply with quote

Poobah

Joined: 05 Jan 2008
Posts: 9400
Location: US: west coast, almost. Otherwise, enroute.

How about checking the file length after q program has written the queue contents to a file? If the file length is zero, there were no messages in the queue. Easily checked in a Win/UNIX script.
_________________
I like deadlines. I like to wave as they pass by.
ב''ה
Lex Orandi, Lex Credendi, Lex Vivendi. As we Worship, So we Believe, So we Live.
Back to top
View user's profile Send private message
RRR
PostPosted: Tue Jun 24, 2014 2:44 pm    Post subject: Reply with quote

Newbie

Joined: 25 Oct 2010
Posts: 8

ya.. I think that is what we will go with if there is no way to get the queue depth using Q program.
Back to top
View user's profile Send private message
zpat
PostPosted: Wed Jun 25, 2014 12:09 am    Post subject: Reply with quote

Jedi Council

Joined: 19 May 2001
Posts: 5849
Location: UK

There is a return code which might be different for an empty queue - try it (use parameter -Vc to map to 0,4,8 for script purposes).

And/or use the parameter -v2 which will report each MQGET to stderr.
_________________
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 » how to Chk queue depth using Q Program?
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.