Author |
Message
|
nathanw |
Posted: Tue Mar 07, 2006 7:48 am Post subject: RUNMQSC Commands in a Script without a def file |
|
|
 Knight
Joined: 14 Jul 2004 Posts: 550
|
Here's one to ponder
I have 30 machines
8 queuemanagers per machine
all queuemanagers talking to a HUGE Gateway vua channles
OK
Setting up the queues is easy as all Queues are the same on each QM
Channels however are unique
Normally I would create a definition file an create them all under
runmqsc QM1 <'file.txt'
HOWEVER!!!! if i was to do this now i would have to create 260 files (NOT MY FIRST CHOICE)
so what I want to have in my script is something like the following
Code: |
CRTMQM TEST2
amqmdain crtlsr TEST -p 1422
STRMQM TEST2
RUNMQSC TEST2
define channel(A1.GATEWAY) CHLTYPE (SDR) trptype(TCP) conname('1.1.1.1(1)') xmitq(GATEWAY)
define channel(GATEWAY.A1) chltype(RCVR) trptype(TCP)
end |
Now if anyone tries teh above it will just end at teh point of opening runmqsc as it is exepecting interacction if you type end it then tries running the channel definition against c:\*.* which of course will not work
any help would be appreciated |
|
Back to top |
|
 |
wschutz |
Posted: Tue Mar 07, 2006 7:56 am Post subject: |
|
|
 Jedi Knight
Joined: 02 Jun 2005 Posts: 3316 Location: IBM (retired)
|
What about:
Code: |
echo "define channel(A1.GATEWAY) CHLTYPE (SDR) trptype(TCP) conname('1.1.1.1(1)') xmitq(GATEWAY)" | RUNMQSC TEST2
|
_________________ -wayne |
|
Back to top |
|
 |
nathanw |
Posted: Tue Mar 07, 2006 8:08 am Post subject: |
|
|
 Knight
Joined: 14 Jul 2004 Posts: 550
|
YU RIPPER!!!!!!!!!!!!!!!!!!!!
it worked once i removed the " marks lol
thanks very much |
|
Back to top |
|
 |
frankdurhine |
Posted: Wed Mar 08, 2006 12:49 am Post subject: piping into runmqsc from shellscript |
|
|
 Novice
Joined: 04 Oct 2005 Posts: 10
|
another nice way would be piping from a shellscript with labels:
LABEL must be placedin a new line on column 0.
Code: |
#! /usr/bin/bash
$FROMQM=QM1
$TOQM=QM2
runmqsc QMNAME <<LABEL
commandline to be piped into rumqsc with $variable
another commandline to be piped into rumqsc with $anothervariable like
DEFINE CHANNEL($FROMQM.$TOQM) LIKE AND SO ON
LABEL
|
|
|
Back to top |
|
 |
|