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 » RUNMQSC Commands in a Script without a def file

Post new topic  Reply to topic
 RUNMQSC Commands in a Script without a def file « View previous topic :: View next topic » 
Author Message
nathanw
PostPosted: Tue Mar 07, 2006 7:48 am    Post subject: RUNMQSC Commands in a Script without a def file Reply with quote

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
View user's profile Send private message MSN Messenger
wschutz
PostPosted: Tue Mar 07, 2006 7:56 am    Post subject: Reply with quote

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
View user's profile Send private message Send e-mail AIM Address
nathanw
PostPosted: Tue Mar 07, 2006 8:08 am    Post subject: Reply with quote

Knight

Joined: 14 Jul 2004
Posts: 550

YU RIPPER!!!!!!!!!!!!!!!!!!!!

it worked once i removed the " marks lol

thanks very much
Back to top
View user's profile Send private message MSN Messenger
frankdurhine
PostPosted: Wed Mar 08, 2006 12:49 am    Post subject: piping into runmqsc from shellscript Reply with quote

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
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 » RUNMQSC Commands in a Script without a def file
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.