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 Index » General IBM MQ Support » Diplaying filtered queues in MQSC ENV

Post new topic  Reply to topic
 Diplaying filtered queues in MQSC ENV « View previous topic :: View next topic » 
Author Message
jeevan
PostPosted: Mon Jan 30, 2006 11:16 am    Post subject: Diplaying filtered queues in MQSC ENV Reply with quote

Grand Master

Joined: 12 Nov 2005
Posts: 1432

Hi guys,

I want to display all the queues except SYSTEM. How can i do that? Is there someting like

dis q(!system.)

I would be grateful if you could help me.

thanks
Back to top
View user's profile Send private message
wschutz
PostPosted: Mon Jan 30, 2006 11:29 am    Post subject: Reply with quote

Jedi Knight

Joined: 02 Jun 2005
Posts: 3316
Location: IBM (retired)

I don't think you can do this, even with MQ V6 (which has the "where" clause).

Best bet is to run runmqsc or saveqmgr with oneline option and grep the output for what you want.
_________________
-wayne
Back to top
View user's profile Send private message Send e-mail AIM Address
csmith28
PostPosted: Mon Jan 30, 2006 11:41 am    Post subject: Reply with quote

Grand Master

Joined: 15 Jul 2003
Posts: 1196
Location: Arizona

In Unix if you want to creat a file that does not include the names of the SYSTEM.* queues, do the following:

Code:
ksh
set -o vi
echo "dis q(*)" | runmqsc QMGNAME | grep QUEUE > qoutall.txt
grep -v SYSTEM > qout.txt

the qout.txt file will contain all the Queue names that do not have SYSTEM in them.
_________________
Yes, I am an agent of Satan but my duties are largely ceremonial.
Back to top
View user's profile Send private message
jeevan
PostPosted: Mon Jan 30, 2006 11:46 am    Post subject: Reply with quote

Grand Master

Joined: 12 Nov 2005
Posts: 1432

thanks guys

I also have one more thing to do and need help. How can i grep the first column in

QMNAME(QM2) STATUS(Running)

this display.

I need to grep the qmname column only in unix.

thanks for help
Back to top
View user's profile Send private message
csmith28
PostPosted: Mon Jan 30, 2006 11:55 am    Post subject: Reply with quote

Grand Master

Joined: 15 Jul 2003
Posts: 1196
Location: Arizona

jeevan wrote:
thanks guys

I also have one more thing to do and need help. How can i grep the first column in

QMNAME(QM2) STATUS(Running)

this display.

I need to grep the qmname column only in unix.

thanks for help


Code:
echo "dis qmgr" | runmqsc QMGRNAME | grep QMNAME | awk '{print $1}'

will echo QMNAME and it's value as in QMNAME(QM02) or whatever.
_________________
Yes, I am an agent of Satan but my duties are largely ceremonial.


Last edited by csmith28 on Mon Jan 30, 2006 1:12 pm; edited 1 time in total
Back to top
View user's profile Send private message
vennela
PostPosted: Mon Jan 30, 2006 11:55 am    Post subject: Reply with quote

Jedi Knight

Joined: 11 Aug 2002
Posts: 4055
Location: Hyderabad, India

Do you want:
QMNAME(QM2)

or
QM2

If former:
Code:
dspmq | awk '{print $1}'


If later:
Code:
dspmq | awk -F \( '{print $2}' | awk -F \) '{print $1}'


On Solaris, you have to do it slightly different, but I guess you got the idea.
Back to top
View user's profile Send private message Send e-mail Visit poster's website
csmith28
PostPosted: Mon Jan 30, 2006 12:00 pm    Post subject: Reply with quote

Grand Master

Joined: 15 Jul 2003
Posts: 1196
Location: Arizona

vennela wrote:
Do you want:
QMNAME(QM2)

or
QM2

If former:
Code:
dspmq | awk '{print $1}'


If later:
Code:
dspmq | awk -F \( '{print $2}' | awk -F \) '{print $1}'


On Solaris, you have to do it slightly different, but I guess you got the idea.


Or what he said.
_________________
Yes, I am an agent of Satan but my duties are largely ceremonial.
Back to top
View user's profile Send private message
jeevan
PostPosted: Mon Jan 30, 2006 1:23 pm    Post subject: Reply with quote

Grand Master

Joined: 12 Nov 2005
Posts: 1432

thanks a lot guys.

jeevan
Back to top
View user's profile Send private message
jeevan
PostPosted: Tue Jan 31, 2006 6:35 am    Post subject: Reply with quote

Grand Master

Joined: 12 Nov 2005
Posts: 1432

In fact my need is to display all queue manager and queue ( non system) in each of them. I can do now one by one, can someone help how i can look throu the qmgr and display all the queues and store in a file.

thanks
Back to top
View user's profile Send private message
wschutz
PostPosted: Tue Jan 31, 2006 6:44 am    Post subject: Reply with quote

Jedi Knight

Joined: 02 Jun 2005
Posts: 3316
Location: IBM (retired)

If you use supportpac ms03 (saveqmgr), you can do this (on linux):
Code:
dspmq | grep 'STATUS(Running)' | sed 's/QMNAME(\(.*\)) *STATUS.*/\1/' | xargs -i ./saveqmgr.linux -s -1 -c -m {} | grep "DEFINE Q" > nonsysq.mqsc
It writes all queues to a single file. You can do similiar things in other unices (I think xargs might be a touch different)

-s tells saveqmgr not to write SYSTEM* objects, -1 says "put it all on one line."
_________________
-wayne
Back to top
View user's profile Send private message Send e-mail AIM Address
Display posts from previous:   
Post new topic  Reply to topic Page 1 of 1

MQSeries.net Forum Index » General IBM MQ Support » Diplaying filtered queues in MQSC ENV
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.