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 » Combine display qlocal and delete qlocal command

Post new topic  Reply to topic
 Combine display qlocal and delete qlocal command « View previous topic :: View next topic » 
Author Message
ghoshly
PostPosted: Thu Apr 22, 2010 3:44 am    Post subject: Combine display qlocal and delete qlocal command Reply with quote

Partisan

Joined: 10 Jan 2008
Posts: 333

Hi,

I want to combine commands like display qlocal and delete qlocal so that I can delete certain qlocals which satisfies teh display condition.

For eg. If I want to delete local queues whose name starts with TEST.

display qlocal(TEST*) gives the queue names and other infos. How I can combine the result so the output becomes the input of delete qlocal() NOPURGE command.

I am using MQ7.0.1.0 and I need to implement this in Windows and AIX 5.3 env.

Please help.


Thanks.
Back to top
View user's profile Send private message
JosephGramig
PostPosted: Thu Apr 22, 2010 3:51 am    Post subject: Reply with quote

Grand Master

Joined: 09 Feb 2006
Posts: 1244
Location: Gold Coast of Florida, USA

There is a reason why that capability was not included.

Can you guess why?
Back to top
View user's profile Send private message AIM Address
Vitor
PostPosted: Thu Apr 22, 2010 5:29 am    Post subject: Re: Combine display qlocal and delete qlocal command Reply with quote

Grand High Poobah

Joined: 11 Nov 2005
Posts: 26093
Location: Texas, USA

ghoshly wrote:
I want to combine commands like display qlocal and delete qlocal so that I can delete certain qlocals which satisfies teh display condition.


You need some script, a lot of testing and a good long think about that requirement.
_________________
Honesty is the best policy.
Insanity is the best defence.
Back to top
View user's profile Send private message
mqjeff
PostPosted: Thu Apr 22, 2010 5:33 am    Post subject: Re: Combine display qlocal and delete qlocal command Reply with quote

Grand Master

Joined: 25 Jun 2008
Posts: 17447

Vitor wrote:
ghoshly wrote:
I want to combine commands like display qlocal and delete qlocal so that I can delete certain qlocals which satisfies teh display condition.


You need some script, a lot of testing and a good long think about that requirement.




"So then to make the process easy for the developers, I put up a quick webpage to run the command from an input string... and then someone put in 'SYSTEM.*' "
Back to top
View user's profile Send private message
bruce2359
PostPosted: Thu Apr 22, 2010 5:46 am    Post subject: Reply with quote

Poobah

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

I've seen this requirement for permanent dynamic reply-to-queues left at application termination. Developers create a queue amq.something or CSQ.something.

One approach to getting a handle on orphaned queues is to implement security rules that prevent amq. and CSQ. objects from being created. A best-practice is to have all objects with names that identify the application and program that created it. PAY.PAY52.TIMECARD, for example, gives the sysadmin a clue as to which app system and which app prog.

A follow-on approach is to requie (under penalty of fish-slapping) apps to close and delete the queue at app termination.
_________________
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
View user's profile Send private message
Vitor
PostPosted: Thu Apr 22, 2010 5:51 am    Post subject: Reply with quote

Grand High Poobah

Joined: 11 Nov 2005
Posts: 26093
Location: Texas, USA

bruce2359 wrote:
I've seen this requirement for permanent dynamic reply-to-queues left at application termination. Developers create a queue amq.something or CSQ.something.


Well yes but these sound rather like predefined queues don't they? I have this contact admin feeling this script is part of a misjudged method to reset a test environment.

bruce2359 wrote:
A follow-on approach is to requie (under penalty of fish-slapping) apps to close and delete the queue at app termination.


Always the best method. Combined in my case with viewing a design that includes permanent dynamic queues somewhat askance.
_________________
Honesty is the best policy.
Insanity is the best defence.
Back to top
View user's profile Send private message
bruce2359
PostPosted: Thu Apr 22, 2010 5:56 am    Post subject: Reply with quote

Poobah

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

I do like the concept of deleting all the SYSTEM. queues. Hee hee. Makes for an interesting recovery.
_________________
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
View user's profile Send private message
mqjeff
PostPosted: Thu Apr 22, 2010 6:11 am    Post subject: Reply with quote

Grand Master

Joined: 25 Jun 2008
Posts: 17447

bruce2359 wrote:
I do like the concept of deleting all the SYSTEM. queues. Hee hee. Makes for an interesting recovery.


well, strmqm -c is a good start.
Back to top
View user's profile Send private message
ghoshly
PostPosted: Thu Apr 22, 2010 6:16 am    Post subject: Sorry.. could not find the reason of not including the capab Reply with quote

Partisan

Joined: 10 Jan 2008
Posts: 333

Sorry,

I did not get the reason why the capability is not included, and understand that some scripts are required for the purpose. Actually I was looking for some existing ones to reuse.

mqjeff, could you please guide me where can I find the solution , I would assure that only MQ admin can get that and no one removes the SYSTEM queues by accident as well


Actually we are trying to promote the QueueManager from DEV to TEST to UAT environments like that, where we would list out queues available as per programs under the project as different programs are in different state .

Thanks in advance.
Back to top
View user's profile Send private message
bruce2359
PostPosted: Thu Apr 22, 2010 6:22 am    Post subject: Reply with quote

Poobah

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

The MQSC manual documents DISPLAY ... WHERE. With this facility, you can display objects that meet the WHERE criteria.

Can you give us an example of what kind of criteria you would be looking for in deleting a set of queues? Like 0 queue depth? Queues with same/similar names?
_________________
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
View user's profile Send private message
ghoshly
PostPosted: Thu Apr 22, 2010 7:09 am    Post subject: Reply with quote

Partisan

Joined: 10 Jan 2008
Posts: 333

Yes.. Delete Queues with similar names..

but display command returning many others like status etc. along with only required queue names. e.g.

display qlocal(RIS*)
1 : display qlocal(RIS*)
AMQ8409: Display Queue details.
QUEUE(RIS.BAM.IN) TYPE(QLOCAL)
AMQ8409: Display Queue details.
QUEUE(RIS.GLM_SWIFTPAY.FAIL) TYPE(QLOCAL)
AMQ8409: Display Queue details.
QUEUE(RIS.GLM_SWIFTPAY.IN) TYPE(QLOCAL)

So I believe need to have only the matching names and then need to feed them under delete qlocal command. but delete qlocal is again not accepting where clause.. so little confused, how to approach.

thanks again for help.
Back to top
View user's profile Send private message
bruce2359
PostPosted: Thu Apr 22, 2010 8:02 am    Post subject: Reply with quote

Poobah

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

WHERE is part of DISPLAY, as you have discovered.

The output from display is verbose, but parsable. Redirect the output > to a file, edit or sort or parse on RIS (using your example), then construct the appropriate DELETE commands.

WMQ for z/OS includes the MAKEDEL feature with CSQUTIL to do this function. Yet another gold star for m/f MQ.
_________________
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
View user's profile Send private message
Vitor
PostPosted: Thu Apr 22, 2010 8:07 am    Post subject: Reply with quote

Grand High Poobah

Joined: 11 Nov 2005
Posts: 26093
Location: Texas, USA

ghoshly wrote:
So I believe need to have only the matching names and then need to feed them under delete qlocal command. but delete qlocal is again not accepting where clause.. so little confused, how to approach.


That's why you need to wrap it in a script.
_________________
Honesty is the best policy.
Insanity is the best defence.
Back to top
View user's profile Send private message
PeterPotkay
PostPosted: Thu Apr 22, 2010 6:48 pm    Post subject: Reply with quote

Poobah

Joined: 15 May 2001
Posts: 7722

MO71 handles this requirement easily via the GUI.
_________________
Peter Potkay
Keep Calm and MQ On
Back to top
View user's profile Send private message
fjb_saper
PostPosted: Thu Apr 22, 2010 8:08 pm    Post subject: Re: Sorry.. could not find the reason of not including the c Reply with quote

Grand High Poobah

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

ghoshly wrote:

Actually we are trying to promote the QueueManager from DEV to TEST to UAT environments like that, where we would list out queues available as per programs under the project as different programs are in different state .

Thanks in advance.

Usually promoting from one environment to the other is handled a little bit differently. Use MS03 (saveqmgr) to save the qmgr config to a file. You can then put the file under version control.

Take the last version from save qmgr and edit to match the specifications of the new environment. Remember to channge all the channel specifications! Apply to the new environment.

Also learn to create your delta files when updating an existing environment. You can then simply promote the delta file to the next environment, with or without changes depending on your environment specifications.

Have fun
_________________
MQ & Broker admin
Back to top
View user's profile Send private message Send e-mail
Display posts from previous:   
Post new topic  Reply to topic Page 1 of 1

MQSeries.net Forum Index » General IBM MQ Support » Combine display qlocal and delete qlocal 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.