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 » IBM MQ Installation/Configuration Support » MQSC Script Question

Post new topic  Reply to topic
 MQSC Script Question « View previous topic :: View next topic » 
Author Message
naxtell
PostPosted: Tue Sep 30, 2003 9:36 am    Post subject: MQSC Script Question Reply with quote

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
View user's profile Send private message
Leafar
PostPosted: Tue Sep 30, 2003 10:17 am    Post subject: Reply with quote

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
View user's profile Send private message MSN Messenger
EddieA
PostPosted: Tue Sep 30, 2003 10:54 am    Post subject: Reply with quote

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
View user's profile Send private message
naxtell
PostPosted: Tue Sep 30, 2003 11:54 am    Post subject: It works Reply with quote

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
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 » IBM MQ Installation/Configuration Support » MQSC Script Question
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.