Author |
Message
|
krypton |
Posted: Fri Nov 02, 2018 12:41 pm Post subject: Combining WHERE clause in MQSC command |
|
|
 Disciple
Joined: 14 Mar 2010 Posts: 186
|
Hi All, we have a requirement where we need to check the name of all the queues which has received message after 3 PM today. (we have around 200+ local queues).
So, I tried to ran the below command
DIS QS(*) WHERE(LPUTTIME GT 15.00.00). it gave me the results but it also included yesterday date after 3 PM queues as well.
So to limit the results to only today date, I combined Where and ran the below command
DIS QS(*) WHERE(LPUTDATE EQ '2018-11-02' AND LPUTTIME GT 15.00.00)
I got an error in the above command, so it looks like it is not supported.
Has anyone written a LINUX bash script/command which can take the queue name from 1st MQSC and pass it to second MQSC (where we check only the put date) and filter out the result = List of Queues where PUT happened after 3 PM today. _________________ Dreams are not something which you watch when you are asleep,it is something which doesn't let you sleep. |
|
Back to top |
|
 |
fjb_saper |
Posted: Fri Nov 02, 2018 8:22 pm Post subject: |
|
|
 Grand High Poobah
Joined: 18 Nov 2003 Posts: 20756 Location: LI,NY
|
Plug for Paul...
I believe MQSCX from mqgem will do what you request  _________________ MQ & Broker admin |
|
Back to top |
|
 |
krypton |
Posted: Fri Nov 02, 2018 10:52 pm Post subject: |
|
|
 Disciple
Joined: 14 Mar 2010 Posts: 186
|
Hi, we would not be able to buy a 03rd Party product. _________________ Dreams are not something which you watch when you are asleep,it is something which doesn't let you sleep. |
|
Back to top |
|
 |
exerk |
Posted: Sat Nov 03, 2018 6:09 am Post subject: Re: Combining WHERE clause in MQSC command |
|
|
 Jedi Council
Joined: 02 Nov 2006 Posts: 6339
|
krypton wrote: |
...Has anyone written a LINUX bash script/command which can take the queue name from 1st MQSC and pass it to second MQSC (where we check only the put date) and filter out the result = List of Queues where PUT happened after 3 PM today. |
I'm happy to do that for you, just let me know where to send the invoice please, and hopefully it won't be considered a third-party product.  _________________ It's puzzling, I don't think I've ever seen anything quite like this before...and it's hard to soar like an eagle when you're surrounded by turkeys. |
|
Back to top |
|
 |
krypton |
Posted: Sat Nov 03, 2018 5:59 pm Post subject: |
|
|
 Disciple
Joined: 14 Mar 2010 Posts: 186
|
Quote: |
I'm happy to do that for you, just let me know where to send the invoice please, and hopefully it won't be considered a third-party product.
|
Hi Exerk, We can pay you in Kindness and would name that script on you. will that work?  _________________ Dreams are not something which you watch when you are asleep,it is something which doesn't let you sleep. |
|
Back to top |
|
 |
exerk |
Posted: Sun Nov 04, 2018 5:39 am Post subject: |
|
|
 Jedi Council
Joined: 02 Nov 2006 Posts: 6339
|
krypton wrote: |
Quote: |
I'm happy to do that for you, just let me know where to send the invoice please, and hopefully it won't be considered a third-party product.
|
Hi Exerk, We can pay you in Kindness and would name that script on you. will that work?  |
Whilst my name would live on, unfortunately these days I'm a lot more mercenary in my outlook  _________________ It's puzzling, I don't think I've ever seen anything quite like this before...and it's hard to soar like an eagle when you're surrounded by turkeys. |
|
Back to top |
|
 |
bruce2359 |
Posted: Sun Nov 04, 2018 5:44 am Post subject: |
|
|
 Poobah
Joined: 05 Jan 2008 Posts: 9469 Location: US: west coast, almost. Otherwise, enroute.
|
Your requirement is to use RUNMQSC with WHERE clause. That limits your options.
The supplied MQExplorer allows you to use filters with AND/OR WHERE-equivalent options. The MQConsole (V8, V9, ...) offers similar capabilities. _________________ 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 |
|
 |
hughson |
Posted: Sun Nov 04, 2018 11:53 pm Post subject: |
|
|
 Padawan
Joined: 09 May 2013 Posts: 1959 Location: Bay of Plenty, New Zealand
|
bruce2359 wrote: |
The supplied MQExplorer allows you to use filters with AND/OR WHERE-equivalent options. |
It does? Since when? _________________ Morag Hughson @MoragHughson
IBM MQ Technical Education Specialist
Get your IBM MQ training here!
MQGem Software |
|
Back to top |
|
 |
Vitor |
Posted: Mon Nov 05, 2018 5:48 am Post subject: |
|
|
 Grand High Poobah
Joined: 11 Nov 2005 Posts: 26093 Location: Texas, USA
|
exerk wrote: |
krypton wrote: |
Quote: |
I'm happy to do that for you, just let me know where to send the invoice please, and hopefully it won't be considered a third-party product.
|
Hi Exerk, We can pay you in Kindness and would name that script on you. will that work?  |
Whilst my name would live on, unfortunately these days I'm a lot more mercenary in my outlook  |
You're not getting a pay rise. Or indeed pay. _________________ Honesty is the best policy.
Insanity is the best defence. |
|
Back to top |
|
 |
exerk |
Posted: Mon Nov 05, 2018 5:51 am Post subject: |
|
|
 Jedi Council
Joined: 02 Nov 2006 Posts: 6339
|
Vitor wrote: |
...You're not getting a pay rise. Or indeed pay. |
I am always content with the crumbs from your table  _________________ It's puzzling, I don't think I've ever seen anything quite like this before...and it's hard to soar like an eagle when you're surrounded by turkeys. |
|
Back to top |
|
 |
bruce2359 |
Posted: Mon Nov 05, 2018 7:01 am Post subject: |
|
|
 Poobah
Joined: 05 Jan 2008 Posts: 9469 Location: US: west coast, almost. Otherwise, enroute.
|
|
Back to top |
|
 |
krypton |
Posted: Mon Nov 05, 2018 12:07 pm Post subject: |
|
|
 Disciple
Joined: 14 Mar 2010 Posts: 186
|
I think only filter is on following queue attributes, but there seems to be NO FILTER on Queue Status like LGET TIME, LPUT TIME, etc.
"You can filter on the following criteria:
The name of the object.
The type of the object (queues and channels only).
An attribute of the object (optional)" _________________ Dreams are not something which you watch when you are asleep,it is something which doesn't let you sleep. |
|
Back to top |
|
 |
krypton |
Posted: Mon Nov 05, 2018 12:09 pm Post subject: |
|
|
 Disciple
Joined: 14 Mar 2010 Posts: 186
|
exerk wrote: |
krypton wrote: |
Quote: |
I'm happy to do that for you, just let me know where to send the invoice please, and hopefully it won't be considered a third-party product.
|
Hi Exerk, We can pay you in Kindness and would name that script on you. will that work?  |
Whilst my name would live on, unfortunately these days I'm a lot more mercenary in my outlook  |
Is there a YES somewhere in there ?  _________________ Dreams are not something which you watch when you are asleep,it is something which doesn't let you sleep. |
|
Back to top |
|
 |
hughson |
Posted: Mon Nov 05, 2018 12:50 pm Post subject: |
|
|
 Padawan
Joined: 09 May 2013 Posts: 1959 Location: Bay of Plenty, New Zealand
|
I don't see anything there that suggests MQ Explorer can use AND/OR in WHERE clauses? To the best of my knowledge, MQ Explorer can do the same as MQSC. After all they both speak to the command server. MQ Explorer has no client side filtering (like MO71 does).
Perhaps I misinterpreted your original statement?
Cheers,
Morag _________________ Morag Hughson @MoragHughson
IBM MQ Technical Education Specialist
Get your IBM MQ training here!
MQGem Software |
|
Back to top |
|
 |
bruce2359 |
Posted: Mon Nov 05, 2018 6:30 pm Post subject: |
|
|
 Poobah
Joined: 05 Jan 2008 Posts: 9469 Location: US: west coast, almost. Otherwise, enroute.
|
The equivalent of MQSC WHERE is filters in the MQExplorer and MQCONSOLE.
I don't have access to an image right now, so I can't validate that filters work with QSTATUS, but they certainly work with Queues, queue managers, and other objects.
MQExplorer filters are discussed in IBM official curriculum. _________________ 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.
Last edited by bruce2359 on Tue Nov 06, 2018 4:30 am; edited 1 time in total |
|
Back to top |
|
 |
|