Author |
Message
|
VijiS |
Posted: Tue Mar 14, 2006 11:16 am Post subject: mq 6.0 curdepth |
|
|
Newbie
Joined: 12 Apr 2005 Posts: 5
|
Is there any way to turn off the queue type , when trying to display the mq curdepth in 6.0
dis ql(QL.QLLOCAL) curdepth
1 : dis ql(QL.QLOCAL) curdepth
AMQ8409: Display Queue details.
QUEUE(QL.QLLOCAL) TYPE(QLOCAL)
CURDEPTH(0)
I need only the curdepth to be display as it was in MQ5.3 |
|
Back to top |
|
 |
kevinf2349 |
Posted: Tue Mar 14, 2006 11:19 am Post subject: |
|
|
 Grand Master
Joined: 28 Feb 2003 Posts: 1311 Location: USA
|
Quote: |
I need only the curdepth to be display as it was in MQ5.3 |
Why? Because you scrape the output?
If that is the reason that is just simply awful coding practice.
If you need the current depth programatically then use PCF commands.
Why do you need to know the depth anyway? If it to establish how many gets to do then that too is bad practice.
 |
|
Back to top |
|
 |
jefflowrey |
Posted: Tue Mar 14, 2006 11:26 am Post subject: |
|
|
Grand Poobah
Joined: 16 Oct 2002 Posts: 19981
|
I keep thinking it would be nice to have runmqsc be able to output data in XML format.
And then I think it would be nice for runmqsc to accept data in XML format.
And then I think that processing PCF messages is at least as easy as processing XML data - and go back to doing real work (or at least posting here). _________________ I am *not* the model of the modern major general. |
|
Back to top |
|
 |
fjb_saper |
Posted: Tue Mar 14, 2006 7:16 pm Post subject: |
|
|
 Grand High Poobah
Joined: 18 Nov 2003 Posts: 20756 Location: LI,NY
|
And check as well the nice additions:
Code: |
dis ql(*) curdepth where ( curdepth gt 0)
dis ql(*) curdepth where (usage eq xmitq) |
 _________________ MQ & Broker admin |
|
Back to top |
|
 |
wschutz |
Posted: Wed Mar 15, 2006 3:03 am Post subject: Re: mq 6.0 curdepth |
|
|
 Jedi Knight
Joined: 02 Jun 2005 Posts: 3316 Location: IBM (retired)
|
VijiS wrote: |
Is there any way to turn off the queue type , when trying to display the mq curdepth in 6.0
dis ql(QL.QLLOCAL) curdepth
1 : dis ql(QL.QLOCAL) curdepth
AMQ8409: Display Queue details.
QUEUE(QL.QLLOCAL) TYPE(QLOCAL)
CURDEPTH(0)
I need only the curdepth to be display as it was in MQ5.3 |
No, queue name and queue type are ALWAYS returned, the best you can do is to pipe to output to a script to "cut" what you need..... _________________ -wayne |
|
Back to top |
|
 |
VijiS |
Posted: Wed Mar 15, 2006 8:19 am Post subject: mq 6.0 curdepth |
|
|
Newbie
Joined: 12 Apr 2005 Posts: 5
|
Thanks all for the input.
We will change the code ( written years back) using PCF commands to accomodate the change. |
|
Back to top |
|
 |
HubertKleinmanns |
Posted: Thu Mar 16, 2006 12:35 am Post subject: Re: mq 6.0 curdepth |
|
|
 Shaman
Joined: 24 Feb 2004 Posts: 732 Location: Germany
|
VijiS wrote: |
Is there any way to turn off the queue type , when trying to display the mq curdepth in 6.0
dis ql(QL.QLLOCAL) curdepth
1 : dis ql(QL.QLOCAL) curdepth
AMQ8409: Display Queue details.
QUEUE(QL.QLLOCAL) TYPE(QLOCAL)
CURDEPTH(0)
I need only the curdepth to be display as it was in MQ5.3 |
If you need the value of CURDEPTH in a shell, try the following:
Code: |
CURDEPTH=`echo "DIS QL(QLLOCAL) CURDEPTH" | \
runmqsc -e QMGR_NAME | grep CURDEPTH | \
sed -e "s/ *CURDEPTH(\([A-Za-z0-9._/%][A-Za-z0-9._/%]*\)).*/\1/"` |
This should work for any MQ version in any Unix shell. _________________ Regards
Hubert |
|
Back to top |
|
 |
Mr Butcher |
Posted: Thu Mar 16, 2006 12:47 am Post subject: |
|
|
 Padawan
Joined: 23 May 2005 Posts: 1716
|
the scriptmaster strikes again!
sorry, could not resist _________________ Regards, Butcher |
|
Back to top |
|
 |
HubertKleinmanns |
Posted: Thu Mar 16, 2006 1:12 am Post subject: |
|
|
 Shaman
Joined: 24 Feb 2004 Posts: 732 Location: Germany
|
Mr Butcher wrote: |
the scriptmaster strikes again!
sorry, could not resist |
But I made a mistake - sorry. The correct command looks as follows:
Code: |
CURDEPTH=`echo "DIS QL(QLLOCAL) CURDEPTH" | \
runmqsc -e QMGR_NAME | grep CURDEPTH | \
sed -e "s/ *.*CURDEPTH(\([A-Za-z0-9._/%][A-Za-z0-9._/%]*\)).*/\1/"` |
Small, but effective change: the ".*" in the sed command before CURDEPTH  _________________ Regards
Hubert |
|
Back to top |
|
 |
|