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 » Can you have MQSC command line parameters

Post new topic  Reply to topic
 Can you have MQSC command line parameters « View previous topic :: View next topic » 
Author Message
blegris
PostPosted: Thu Mar 22, 2007 12:43 pm    Post subject: Can you have MQSC command line parameters Reply with quote

Newbie

Joined: 22 Mar 2007
Posts: 4

I have a mqsc script to setup a Queue Managers and all its mq objects. I want to be able to dynamically pass in the queue manager name to the script. Is it possible to have command line parameters or dynamic parameters for the runmqsc scripts?

Any ideas on how to do that?

Thanks in advance.

Brent
Back to top
View user's profile Send private message
jefflowrey
PostPosted: Thu Mar 22, 2007 12:49 pm    Post subject: Reply with quote

Grand Poobah

Joined: 16 Oct 2002
Posts: 19981

Start with normal shell scripting.
_________________
I am *not* the model of the modern major general.
Back to top
View user's profile Send private message
marcin.kasinski
PostPosted: Thu Mar 22, 2007 12:51 pm    Post subject: Re: Can you have MQSC command line parameters Reply with quote

Sentinel

Joined: 21 Dec 2004
Posts: 850
Location: Poland / Warsaw

blegris wrote:
I have a mqsc script to setup a Queue Managers and all its mq objects. I want to be able to dynamically pass in the queue manager name to the script. Is it possible to have command line parameters or dynamic parameters for the runmqsc scripts?

Any ideas on how to do that?

Thanks in advance.

Brent



We have template mqsc file and additional file with parameters.

Then running our code we merge template and parametr file and create out mqsc file.

This code could be everything perl, regexp, ...
_________________
Marcin
Back to top
View user's profile Send private message Visit poster's website
anantha sreenivasan
PostPosted: Fri Mar 23, 2007 3:00 am    Post subject: Reply with quote

Acolyte

Joined: 26 Sep 2006
Posts: 72

Adding to the above replies,

you can also indirect queue creation scripts to a queue manager through a file.

Suppose you have all the object definitions to be created in a queue manager in a file say obj.txt

You can create objects in the queue manager by indirecting this file from command prompt through runmqsc and also write output of the commands to a file

Example: runmqsc QMGRNAME < obj.txt > out.txt

where out.txt contains the output of the commands
Back to top
View user's profile Send private message
Pankaj
PostPosted: Fri Mar 23, 2007 3:40 am    Post subject: Reply with quote

Newbie

Joined: 18 May 2004
Posts: 8
Location: India

there r some more tricky ways ...which may help you in writing script with small changes...

check out http://publib.boulder.ibm.com/infocenter/wmqv6/v6r0/index.jsp for example script file...You can modify this script to accept arguments from command prompt.

You can also pass MQSC commands from cmd...
On Windows: echo ALTER QMGR SCMDSERV(QMGR) | runmqsc Queue_Manager_Name
On UNIX: echo "ALTER QMGR SCMDSERV(QMGR)" | runmqsc Queue_Manager_Name

Hope it will help...
Back to top
View user's profile Send private message Yahoo Messenger
marcin.kasinski
PostPosted: Fri Mar 23, 2007 4:07 am    Post subject: Reply with quote

Sentinel

Joined: 21 Dec 2004
Posts: 850
Location: Poland / Warsaw

Pankaj wrote:


You can also pass MQSC commands from cmd...
On Windows: echo ALTER QMGR SCMDSERV(QMGR) | runmqsc Queue_Manager_Name
On UNIX: echo "ALTER QMGR SCMDSERV(QMGR)" | runmqsc Queue_Manager_Name



I wouldn’t recommend this.

For simple operation it is ok, but if in your you have to execute lots of commands it would be time consuming.

It's my opinion.
_________________
Marcin
Back to top
View user's profile Send private message Visit poster's website
Display posts from previous:   
Post new topic  Reply to topic Page 1 of 1

MQSeries.net Forum Index » General IBM MQ Support » Can you have MQSC command line parameters
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.