|
RSS Feed - WebSphere MQ Support
|
RSS Feed - Message Broker Support
|
 |
|
MQSC Script Question |
« View previous topic :: View next topic » |
Author |
Message
|
naxtell |
Posted: Tue Sep 30, 2003 9:36 am Post subject: MQSC Script Question |
|
|
Novice
Joined: 30 Sep 2003 Posts: 17
|
I am creating queues, channels, processes, etc... using the MQSC commands on an NT based system. From the command prompt I run a batch file that contans the following:
runmqsc <setupCommands.in> setupReport.out
This starts reading the commands in from "setupCommands.in" fine and will create Queues, etc... A basic version of this file would look like this
Define qlocal(orange.queue) +
.......
I will have quite a few queues, processes, and channels to create on different systems. So I want to, at the top of the "setupCommands.in" file, insert in user-defined variables in order to easily keep track of changes so I dont have to search through the code to do this. In the end I would hope to end up with something along the lines of:
TempVar1 = "Orange.Queue"
TempVar2 = "Yellow.Queue"
...
Define qlocal(TempVar1)
Define qlocal(TempVar2)
...
Does anyone know how to implement the use of variables in this setup? Any ideas would be appreciated.
Thanks,
Nate  |
|
Back to top |
|
 |
Leafar |
Posted: Tue Sep 30, 2003 10:17 am Post subject: |
|
|
 Acolyte
Joined: 03 Apr 2003 Posts: 74 Location: Buenos Aires
|
Try ussing
define qlocal(%1)
define qlocal(%2)
and then do :
runmqsc <setupCommands.in orange.queue red.queue ,... > setupReport.out
You must be careful, for each % must be a xxx.queue in the command line
And let me know if it works
Saludos
Rafael |
|
Back to top |
|
 |
EddieA |
Posted: Tue Sep 30, 2003 10:54 am Post subject: |
|
|
 Jedi
Joined: 28 Jun 2001 Posts: 2453 Location: Los Angeles
|
That won't work, because it's runmqsc that's reading the setupCommands.in file and it has no concept of variables.
The only way you might get this to work is to write a batch script that creates the file that is then input to runmqsc. That way, the creation of the command file can use variables.
Kinda like:
Code: |
echo DEFINE QLOCAL ( %1 ) > mqsc.txt
echo DEFINE QLOCAL ( %2 ) >> mqsc.txt
runmqsc < mqsc.txt |
Cheers, _________________ Eddie Atherton
IBM Certified Solution Developer - WebSphere Message Broker V6.1
IBM Certified Solution Developer - WebSphere Message Broker V7.0 |
|
Back to top |
|
 |
naxtell |
Posted: Tue Sep 30, 2003 11:54 am Post subject: It works |
|
|
Novice
Joined: 30 Sep 2003 Posts: 17
|
Right, it doesn't have any concept of variables. Thanks Eddie, it looks like that will work. I tried it and file is being created correctly as long as i get the syntax correct. I may look into using user-defined variables now and possibly ask for user input. That may be closer to what I had in mind, but you got me on the right track.
Thanks again,
Nate  |
|
Back to top |
|
 |
|
|
 |
|
Page 1 of 1 |
|
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
|
|
|
|