Author |
Message
|
abhijit_mishra |
Posted: Fri Oct 30, 2009 4:32 am Post subject: MQSC to filter out System objs and show only user Def object |
|
|
 Apprentice
Joined: 21 Aug 2009 Posts: 35 Location: India
|
Hello,
What I want is to list out only the user defined objects like queues/Channels and filter out system defined object (like SYSTEM.*)
Is there a way to do it like
DIS QL(*) where (QUEUE NL 'SYSTEM.*' )
But the above never works.
Is there a easy way of doing it.
Any help will be appreciated.  |
|
Back to top |
|
 |
Mr Butcher |
Posted: Fri Oct 30, 2009 4:46 am Post subject: |
|
|
 Padawan
Joined: 23 May 2005 Posts: 1716
|
afaik, QUEUE is not a filter keyword. _________________ Regards, Butcher |
|
Back to top |
|
 |
abhijit_mishra |
Posted: Fri Oct 30, 2009 4:51 am Post subject: |
|
|
 Apprentice
Joined: 21 Aug 2009 Posts: 35 Location: India
|
I know it's not a filter bro..
I was just giving a hint on what I really wanted..
Any alternative for that ? |
|
Back to top |
|
 |
Mr Butcher |
Posted: Fri Oct 30, 2009 4:55 am Post subject: |
|
|
 Padawan
Joined: 23 May 2005 Posts: 1716
|
well, script it. pipe the display command to runmqsc and pipe the output to some filter commands. but i am not a unix or windows script guru so i quit at this point.
mq explorer has a button to show / hide system objects. _________________ Regards, Butcher |
|
Back to top |
|
 |
abhijit_mishra |
Posted: Fri Oct 30, 2009 5:22 am Post subject: |
|
|
 Apprentice
Joined: 21 Aug 2009 Posts: 35 Location: India
|
Is there a way to do it directly using MQSC or Java/PCF ?
I'm creating an app that will list only user def objects. So piping option will be tedious for me. |
|
Back to top |
|
 |
manicminer |
Posted: Fri Oct 30, 2009 6:20 am Post subject: |
|
|
 Disciple
Joined: 11 Jul 2007 Posts: 177
|
abhijit_mishra wrote: |
Is there a way to do it directly using MQSC or Java/PCF ?
I'm creating an app that will list only user def objects. So piping option will be tedious for me. |
If you are writing Java and PCF, sure. Get the list of queues back, remove the ones from the list where the name starts system. _________________ Give a man a fish and you feed him for a day. Teach a man to fish and you feed him for a lifetime. |
|
Back to top |
|
 |
mqjeff |
Posted: Fri Oct 30, 2009 6:42 am Post subject: |
|
|
Grand Master
Joined: 25 Jun 2008 Posts: 17447
|
Be aware that for all objects of all types, it is not sufficient to merely remove anything that starts with the word SYSTEM.
It's *close*, but not sufficient.
At least for v7 and up. |
|
Back to top |
|
 |
abhijit_mishra |
Posted: Mon Nov 02, 2009 12:37 am Post subject: |
|
|
 Apprentice
Joined: 21 Aug 2009 Posts: 35 Location: India
|
@mqjeff
I totally agree with you. That's what my major concern is.
A user can create a object starting with SYSTEM. and if I filter it out then will be my bad..
So I was curious if IBM has some MQSC which can check if it's a System def or a user defined.
Many thanks to all for replying. |
|
Back to top |
|
 |
mqjeff |
Posted: Mon Nov 02, 2009 3:34 am Post subject: |
|
|
Grand Master
Joined: 25 Jun 2008 Posts: 17447
|
Even if the user doesn't create an object that starts with SYSTEM, there are one or two objects that *MQ* creates that *are* SYSTEM objects that *don't* start with SYSTEM. |
|
Back to top |
|
 |
PeterPotkay |
Posted: Mon Nov 02, 2009 4:04 am Post subject: |
|
|
 Poobah
Joined: 15 May 2001 Posts: 7722
|
Create a new QM, note all the objects created, and build your app to not display them. No "tedious" piping required. As new versions of MQ come out, yeah, you might have to add a few more names to your list occasionally. _________________ Peter Potkay
Keep Calm and MQ On |
|
Back to top |
|
 |
mqjeff |
Posted: Mon Nov 02, 2009 5:17 am Post subject: |
|
|
Grand Master
Joined: 25 Jun 2008 Posts: 17447
|
And you'll still miss that SUBSCRIPTION object that starts with the qmgr name. |
|
Back to top |
|
 |
abhijit_mishra |
Posted: Mon Nov 02, 2009 5:30 am Post subject: |
|
|
 Apprentice
Joined: 21 Aug 2009 Posts: 35 Location: India
|
So it's going to be lot more interesting than what I initially thought.. |
|
Back to top |
|
 |
bruce2359 |
Posted: Mon Nov 02, 2009 6:28 am Post subject: |
|
|
 Poobah
Joined: 05 Jan 2008 Posts: 9469 Location: US: west coast, almost. Otherwise, enroute.
|
Quote: |
A user can create a object starting with SYSTEM |
Create a security rule that prevents anyone but mqm from creating SYSTEM objects.
As a best-practice, objects should have names that tell what application the object belongs to - like PAY. or INV., etc.. _________________ 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 |
|
 |
|