Author |
Message
|
santosh.veerlapati |
Posted: Mon Sep 14, 2009 10:50 am Post subject: Queue Manager configurations through batch file |
|
|
Voyager
Joined: 19 Jun 2008 Posts: 87
|
HI
I want to configure the queue manager and related queue configuration through some sample script. In that script it should take the queue manager name from the variable . the idea is like this
in MQscript.batch file..contents are
set brigadename=BR0005
set PATH=C:\Program Files\IBM\WebSphere MQ\bin;
crtmqm %brigadename%_SpokeQM
amqmdain start %brigadename%_SpokeQM
runmqsc %jbrigadename%_SpokeQM
DEFINE LISTENER('LISTENER.TCP') TRPTYPE(TCP) PORT(1423) CONTROL(QMGR) DESCR('TCP/IP Listener for queue manager')
START LISTENER('LISTENER.TCP')
DEFINE QLOCAL('%brigadename%_Queue') DESCR('BR0001_Spoke_Queue')
END
but i m unable to get working with this.
can anybody suggest me on this
thanks in advance
santosh kumar veerlapati |
|
Back to top |
|
 |
Vitor |
Posted: Mon Sep 14, 2009 11:24 am Post subject: Re: Queue Manager configurations through batch file |
|
|
 Grand High Poobah
Joined: 11 Nov 2005 Posts: 26093 Location: Texas, USA
|
santosh.veerlapati wrote: |
but i m unable to get working with this.
can anybody suggest me on this
|
Well you could try telling us what's not working about this. We might then be able to actually suggest something.
Just looking at what you're posting I'd theorise the script isn't presenting the DEFINE LISTENER via sysin as it should.
But that's a really dumb script error not a WMQ problem so it must just be how you've posted it. _________________ Honesty is the best policy.
Insanity is the best defence. |
|
Back to top |
|
 |
JosephGramig |
Posted: Mon Sep 14, 2009 11:26 am Post subject: |
|
|
 Grand Master
Joined: 09 Feb 2006 Posts: 1244 Location: Gold Coast of Florida, USA
|
try
Code: |
echo "mqsc command"|runmqsc <QMGR> |
Look at amqmdain for configuring stanzas from the command line. |
|
Back to top |
|
 |
santosh.veerlapati |
Posted: Mon Sep 14, 2009 11:28 am Post subject: |
|
|
Voyager
Joined: 19 Jun 2008 Posts: 87
|
yeah u r correct its not the wmq error, but i want some suggestion that fits to my requirement
thanks
satnosh kumar veerlapati |
|
Back to top |
|
 |
Vitor |
Posted: Mon Sep 14, 2009 11:38 am Post subject: |
|
|
 Grand High Poobah
Joined: 11 Nov 2005 Posts: 26093 Location: Texas, USA
|
santosh.veerlapati wrote: |
yeah u r correct its not the wmq error, but i want some suggestion that fits to my requirement
|
Aside from the 2 you've been given?  _________________ Honesty is the best policy.
Insanity is the best defence. |
|
Back to top |
|
 |
smdavies99 |
Posted: Mon Sep 14, 2009 12:30 pm Post subject: |
|
|
 Jedi Council
Joined: 10 Feb 2003 Posts: 6076 Location: Somewhere over the Rainbow this side of Never-never land.
|
I usually put the runmqsc commands into a file and then use the file as input to the runmqsc app
If you want to create the object definitions in the script
Code: |
echo alter qmgr maxmsgl 81920000 > commands.mqsc
echo dis qmgr >> commands.mqsc
|
Then
Code: |
crtmqm FRED
strmqm FRED
runmqsc FRED < commands.mqsc
|
As the object definitions don't change much these are held as separate files in something like subversion along with the script.
Having a set of scripts like this make the whole process far more auditable, repeatable & maintainable. _________________ WMQ User since 1999
MQSI/WBI/WMB/'Thingy' User since 2002
Linux user since 1995
Every time you reinvent the wheel the more square it gets (anon). If in doubt think and investigate before you ask silly questions. |
|
Back to top |
|
 |
gbaddeley |
Posted: Mon Sep 14, 2009 7:44 pm Post subject: |
|
|
 Jedi Knight
Joined: 25 Mar 2003 Posts: 2538 Location: Melbourne, Australia
|
|
Back to top |
|
 |
|