Author |
Message
|
George Carey |
Posted: Thu Mar 08, 2007 3:00 pm Post subject: Writing MQSC scripts using the new where filter clause |
|
|
Knight
Joined: 29 Jan 2007 Posts: 500 Location: DC
|
IBM has update the mqsc command capabilities with a new where filter that can be put on most DISPLAY type commands. This was great idea as the wild card parsing was extremely primitive, as one could not have embedded wild cards or pre-fixing wild card character only suffixed wild card characters like dis ql(abc*) , and not dis ql(abc* yz) or (*yz),
so I go to use this new where clause to say to find all the non-SYSTEM queues on the qmgr. So I try ,
dis ql(*) where( queue NL SYS*) !!!! I get SYNTAX error , I do the RTFM thing and to my utter amazement I do not see the queue name as a keyword option for the 'where' filter !!! AYFKM !!
Somebody please tell me I am wrong ! _________________ "Truth is ... grasping the virtually unconditioned",
Bernard F. Lonergan S.J.
(from book titled "Insight" subtitled "A Study of Human Understanding") |
|
Back to top |
|
 |
Michael Dag |
Posted: Fri Mar 09, 2007 12:01 am Post subject: |
|
|
 Jedi Knight
Joined: 13 Jun 2002 Posts: 2607 Location: The Netherlands (Amsterdam)
|
I couldn't find the queuename either...
on the explorer you can exclude the system queues, but I guess that is an explorer functionality... _________________ Michael
MQSystems Facebook page |
|
Back to top |
|
 |
Michael Dag |
Posted: Fri Mar 09, 2007 12:14 am Post subject: |
|
|
 Jedi Knight
Joined: 13 Jun 2002 Posts: 2607 Location: The Netherlands (Amsterdam)
|
since SYSTEM queues are created when the Qmgr is created
get the CRDATE of the Qmgr and do:
DIS Q(*) WHERE(CRDATE GT 'yyyy-mm-dd')
usng EQ should show all the SYSTEM Queues... _________________ Michael
MQSystems Facebook page |
|
Back to top |
|
 |
fjb_saper |
Posted: Fri Mar 09, 2007 4:14 am Post subject: |
|
|
 Grand High Poobah
Joined: 18 Nov 2003 Posts: 20756 Location: LI,NY
|
Michael Dag wrote: |
since SYSTEM queues are created when the Qmgr is created
get the CRDATE of the Qmgr and do:
DIS Q(*) WHERE(CRDATE GT 'yyyy-mm-dd')
usng EQ should show all the SYSTEM Queues... |
You cannot use anything against qname.
We use a list of qnames that are then trimmed using grep. (grep -v)
Then we create a script for those queues...
i.e. for SYSTEM queues use
dis q(system.*) and no where clause on qname....
Enjoy  _________________ MQ & Broker admin |
|
Back to top |
|
 |
George Carey |
Posted: Fri Mar 09, 2007 9:41 am Post subject: |
|
|
Knight
Joined: 29 Jan 2007 Posts: 500 Location: DC
|
I was certain good and clever admin folks would be able to come up with work arounds for the fact that one cannot supply the freaking queue name in a where filter, but do you ever say why!!! And instead say hey IBM how about fixing that obvious short coming (again!).
On the grep -v solution, that won't work too well as a script option on non-unix boxes.
But this is only relevant if one is trying to standardized scripts as much as possible.  _________________ "Truth is ... grasping the virtually unconditioned",
Bernard F. Lonergan S.J.
(from book titled "Insight" subtitled "A Study of Human Understanding") |
|
Back to top |
|
 |
George Carey |
Posted: Fri Mar 09, 2007 9:43 am Post subject: |
|
|
Knight
Joined: 29 Jan 2007 Posts: 500 Location: DC
|
sorry fat fingered repeat _________________ "Truth is ... grasping the virtually unconditioned",
Bernard F. Lonergan S.J.
(from book titled "Insight" subtitled "A Study of Human Understanding") |
|
Back to top |
|
 |
|