Author |
Message
|
rao135 |
Posted: Wed Dec 31, 2008 10:05 am Post subject: shell script error + stop channel |
|
|
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 |
|
 |
Vitor |
Posted: Wed Dec 31, 2008 12:47 pm Post subject: |
|
|
 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 |
|
 |
JosephGramig |
Posted: Wed Dec 31, 2008 1:24 pm Post subject: |
|
|
 Grand Master
Joined: 09 Feb 2006 Posts: 1244 Location: Gold Coast of Florida, USA
|
- Open your browser
- Go to the WMQ Info Center http://publib.boulder.ibm.com/infocenter/wmqv6/v6r0/index.jsp
- Type "runmqsc return codes" in the Search field on that page
- Click on first link
- Scroll page almost to bottom and stop at the section that is labeled "Return codes"
- 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 |
|
 |
rao135 |
Posted: Wed Dec 31, 2008 2:37 pm Post subject: |
|
|
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 |
|
 |
fjb_saper |
Posted: Wed Dec 31, 2008 4:20 pm Post subject: |
|
|
 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 |
|
 |
Vitor |
Posted: Thu Jan 01, 2009 3:25 am Post subject: |
|
|
 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 |
|
 |
|