Author |
Message
|
RRR |
Posted: Tue Jun 24, 2014 11:48 am Post subject: how to Chk queue depth using Q Program? |
|
|
 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 |
|
 |
jsware |
Posted: Tue Jun 24, 2014 12:40 pm Post subject: |
|
|
 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 |
|
 |
RRR |
Posted: Tue Jun 24, 2014 12:54 pm Post subject: |
|
|
 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 |
|
 |
zpat |
Posted: Tue Jun 24, 2014 1:23 pm Post subject: |
|
|
 Jedi Council
Joined: 19 May 2001 Posts: 5866 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 |
|
 |
RRR |
Posted: Tue Jun 24, 2014 1:49 pm Post subject: |
|
|
 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 |
|
 |
bruce2359 |
Posted: Tue Jun 24, 2014 2:34 pm Post subject: |
|
|
 Poobah
Joined: 05 Jan 2008 Posts: 9469 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 |
|
 |
RRR |
Posted: Tue Jun 24, 2014 2:44 pm Post subject: |
|
|
 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 |
|
 |
zpat |
Posted: Wed Jun 25, 2014 12:09 am Post subject: |
|
|
 Jedi Council
Joined: 19 May 2001 Posts: 5866 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 |
|
 |
|