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 IndexGeneral IBM MQ SupportCombining WHERE clause in MQSC command

Post new topicReply to topic Goto page 1, 2  Next
Combining WHERE clause in MQSC command View previous topic :: View next topic
Author Message
krypton
PostPosted: Fri Nov 02, 2018 12:41 pm Post subject: Combining WHERE clause in MQSC command Reply with quote

Disciple

Joined: 14 Mar 2010
Posts: 158

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
View user's profile Send private message
fjb_saper
PostPosted: Fri Nov 02, 2018 8:22 pm Post subject: Reply with quote

Grand Poobah

Joined: 18 Nov 2003
Posts: 19770
Location: LI,NY

Plug for Paul...

I believe MQSCX from mqgem will do what you request
_________________
MQ & Broker admin
Back to top
View user's profile Send private message Send e-mail
krypton
PostPosted: Fri Nov 02, 2018 10:52 pm Post subject: Reply with quote

Disciple

Joined: 14 Mar 2010
Posts: 158

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
View user's profile Send private message
exerk
PostPosted: Sat Nov 03, 2018 6:09 am Post subject: Re: Combining WHERE clause in MQSC command Reply with quote

Jedi Council

Joined: 02 Nov 2006
Posts: 5955

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
View user's profile Send private message
krypton
PostPosted: Sat Nov 03, 2018 5:59 pm Post subject: Reply with quote

Disciple

Joined: 14 Mar 2010
Posts: 158

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
View user's profile Send private message
exerk
PostPosted: Sun Nov 04, 2018 5:39 am Post subject: Reply with quote

Jedi Council

Joined: 02 Nov 2006
Posts: 5955

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
View user's profile Send private message
bruce2359
PostPosted: Sun Nov 04, 2018 5:44 am Post subject: Reply with quote

Poobah

Joined: 05 Jan 2008
Posts: 8188
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 would tell you a UDP joke, but you might not get it.
Back to top
View user's profile Send private message
hughson
PostPosted: Sun Nov 04, 2018 11:53 pm Post subject: Reply with quote

Sentinel

Joined: 09 May 2013
Posts: 840
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
View user's profile Send private message Visit poster's website
Vitor
PostPosted: Mon Nov 05, 2018 5:48 am Post subject: Reply with quote

Grand High Poobah

Joined: 11 Nov 2005
Posts: 25310
Location: Ohio, 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
View user's profile Send private message
exerk
PostPosted: Mon Nov 05, 2018 5:51 am Post subject: Reply with quote

Jedi Council

Joined: 02 Nov 2006
Posts: 5955

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
View user's profile Send private message
bruce2359
PostPosted: Mon Nov 05, 2018 7:01 am Post subject: Reply with quote

Poobah

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

hughson wrote:
bruce2359 wrote:
The supplied MQExplorer allows you to use filters with AND/OR WHERE-equivalent options.
It does? Since when?

V7.5 I think. https://www.ibm.com/support/knowledgecenter/en/SSFKSJ_7.5.0/com.ibm.mq.explorer.doc/e_filter_create.htm

https://www.ibm.com/support/knowledgecenter/en/SSFKSJ_9.0.0/com.ibm.mq.explorer.doc/e_filter.html
_________________
I would tell you a UDP joke, but you might not get it.
Back to top
View user's profile Send private message
krypton
PostPosted: Mon Nov 05, 2018 12:07 pm Post subject: Reply with quote

Disciple

Joined: 14 Mar 2010
Posts: 158

Quote:
V7.5 I think. https://www.ibm.com/support/knowledgecenter/en/SSFKSJ_7.5.0/com.ibm.mq.explorer.doc/e_filter_create.htm

https://www.ibm.com/support/knowledgecenter/en/SSFKSJ_9.0.0/com.ibm.mq.explorer.doc/e_filter.html


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
View user's profile Send private message
krypton
PostPosted: Mon Nov 05, 2018 12:09 pm Post subject: Reply with quote

Disciple

Joined: 14 Mar 2010
Posts: 158

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
View user's profile Send private message
hughson
PostPosted: Mon Nov 05, 2018 12:50 pm Post subject: Reply with quote

Sentinel

Joined: 09 May 2013
Posts: 840
Location: Bay of Plenty, New Zealand

bruce2359 wrote:
hughson wrote:
bruce2359 wrote:
The supplied MQExplorer allows you to use filters with AND/OR WHERE-equivalent options.
It does? Since when?

V7.5 I think. https://www.ibm.com/support/knowledgecenter/en/SSFKSJ_7.5.0/com.ibm.mq.explorer.doc/e_filter_create.htm

https://www.ibm.com/support/knowledgecenter/en/SSFKSJ_9.0.0/com.ibm.mq.explorer.doc/e_filter.html

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
View user's profile Send private message Visit poster's website
bruce2359
PostPosted: Mon Nov 05, 2018 6:30 pm Post subject: Reply with quote

Poobah

Joined: 05 Jan 2008
Posts: 8188
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 would tell you a UDP joke, but you might not get it.


Last edited by bruce2359 on Tue Nov 06, 2018 4:30 am; edited 1 time in total
Back to top
View user's profile Send private message
Display posts from previous:
Post new topicReply to topic Goto page 1, 2  Next Page 1 of 2

MQSeries.net Forum IndexGeneral IBM MQ SupportCombining WHERE clause in MQSC command
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.