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 » shell script error + stop channel

Post new topic  Reply to topic
 shell script error + stop channel « View previous topic :: View next topic » 
Author Message
rao135
PostPosted: Wed Dec 31, 2008 10:05 am    Post subject: shell script error + stop channel Reply with quote

Newbie

Joined: 27 Sep 2006
Posts: 7

Hi,

I am doing shell scripting for MQ and in that for STOP Channels part,

echo "stop channel($Channel)" | runmqsc $QMGR_NAME


though the script is running successfully by stopping the channel, the return code after that line is giving me as 10 instead of zero.

this works fine for all channels except SVRCONN.

so any help/suggestion why for SVRCONN channels the retun code is non zero though the the script works fine.

Thanks,
rao
Back to top
View user's profile Send private message
Vitor
PostPosted: Wed Dec 31, 2008 12:47 pm    Post subject: Reply with quote

Grand High Poobah

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

A better question is why you need a scripted method of stopping channels; it's a fairly rare thing to need to do.

A return code of 10 from runmqsc is an error, as shown here; I'd suspect (but only suspect) there are active clients when the channel is stopped.
_________________
Honesty is the best policy.
Insanity is the best defence.
Back to top
View user's profile Send private message
JosephGramig
PostPosted: Wed Dec 31, 2008 1:24 pm    Post subject: Reply with quote

Grand Master

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


  1. Open your browser
  2. Go to the WMQ Info Center http://publib.boulder.ibm.com/infocenter/wmqv6/v6r0/index.jsp
  3. Type "runmqsc return codes" in the Search field on that page
  4. Click on first link
  5. Scroll page almost to bottom and stop at the section that is labeled "Return codes"
  6. Read section


When stopping channels MODE(FORCE) is most likely what you need. With SVRCONN, you probably also want to specify the CONNAME to kill particular offenders. Clients probably will try to reconnect if coded correctly. You might need to stop the listener.

This is the part where I can justify at least two listeners. One for SENDER/RECEIVER variants and another for just SVRCONN. That way you can turn off just those folks.

Why did you write the script?
Back to top
View user's profile Send private message AIM Address
rao135
PostPosted: Wed Dec 31, 2008 2:37 pm    Post subject: Reply with quote

Newbie

Joined: 27 Sep 2006
Posts: 7

Thanks for the responses..

There is requirment which we need to stop channels..so thats why i am going for it..

I had already gone thru the links provided below..the question is i am not able to find any error in the script line..and retrun code is 10 even it is successfully stopping the channel.

There are no active clients when the channel is being stopped , then also i get return code as 10.
Back to top
View user's profile Send private message
fjb_saper
PostPosted: Wed Dec 31, 2008 4:20 pm    Post subject: Reply with quote

Grand High Poobah

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

rao135 wrote:
Thanks for the responses..

There is requirment which we need to stop channels..so thats why i am going for it..

I had already gone thru the links provided below..the question is i am not able to find any error in the script line..and retrun code is 10 even it is successfully stopping the channel.

There are no active clients when the channel is being stopped , then also i get return code as 10.

The documentation says that with RC 10 you had some entries in the input file that had command errors. Those were not fatal, so the commands in error were ignored. The output (sysout/syserr) will show you what was in error.
Have fun
_________________
MQ & Broker admin
Back to top
View user's profile Send private message Send e-mail
Vitor
PostPosted: Thu Jan 01, 2009 3:25 am    Post subject: Reply with quote

Grand High Poobah

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

rao135 wrote:
There is requirment which we need to stop channels..so thats why i am going for it..


This is no answer - "We're doing it because we need to". Are you trying eject orphan clients? Free up resources? Annoy the users?

There are more effective ways of doing all these.
_________________
Honesty is the best policy.
Insanity is the best defence.
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic  Reply to topic Page 1 of 1

MQSeries.net Forum Index » General IBM MQ Support » shell script error + stop channel
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.