Author |
Message
|
learner |
Posted: Wed Sep 22, 2004 9:30 am Post subject: writting MQ commands to file |
|
|
Newbie
Joined: 21 Sep 2004 Posts: 6
|
I want to run the MQ Command file but where do I store it so that I can run it from the command prompt.I am a new bie any help greatly appreciated.  |
|
Back to top |
|
 |
siliconfish |
Posted: Wed Sep 22, 2004 9:39 am Post subject: |
|
|
 Master
Joined: 12 Aug 2002 Posts: 203 Location: USA
|
If you are talking about MQSC commands -
write the commands to any txt file and use the following syntax
runmqsc qmgr_name < /anypath/mqsc_cmd.txt |
|
Back to top |
|
 |
learner |
Posted: Wed Sep 22, 2004 10:15 am Post subject: thx |
|
|
Newbie
Joined: 21 Sep 2004 Posts: 6
|
It does not work.so what you mean is that I can put the file anywhere and just write anypath/... |
|
Back to top |
|
 |
vennela |
Posted: Wed Sep 22, 2004 10:19 am Post subject: |
|
|
 Jedi Knight
Joined: 11 Aug 2002 Posts: 4055 Location: Hyderabad, India
|
What doesn not.
What did you exactly do?. It should work. |
|
Back to top |
|
 |
learner |
Posted: Wed Sep 22, 2004 10:20 am Post subject: |
|
|
Newbie
Joined: 21 Sep 2004 Posts: 6
|
I just typed in the command on the commandprompt |
|
Back to top |
|
 |
siliconfish |
Posted: Wed Sep 22, 2004 10:24 am Post subject: |
|
|
 Master
Joined: 12 Aug 2002 Posts: 203 Location: USA
|
"anypath" meant for exp : u have a file called mqsc_cmd.txt in a dir called /usr/local/siliconfish/
then replace "anypath" with /usr/local/siliconfish
that would be
runmqsc qmgr_name < /usr/local/siliconfish/mqsc_cmd.txt |
|
Back to top |
|
 |
learner |
Posted: Wed Sep 22, 2004 10:47 am Post subject: |
|
|
Newbie
Joined: 21 Sep 2004 Posts: 6
|
C:\>runmqsc QMCTest </Progra~1/IBM/Websph~1/E1_ST03.txt
this is what I do and I get an error that the specified file does not exist. |
|
Back to top |
|
 |
vennela |
Posted: Wed Sep 22, 2004 11:12 am Post subject: |
|
|
 Jedi Knight
Joined: 11 Aug 2002 Posts: 4055 Location: Hyderabad, India
|
Give the absolute path
Put it in double quotes.
Like
C:\>runmqsc QMCTest <"C:\Program Files\Ibm\Imnnq\instance\E1_ST03.txt " |
|
Back to top |
|
 |
offshore |
Posted: Wed Sep 22, 2004 11:19 am Post subject: |
|
|
 Master
Joined: 20 Jun 2002 Posts: 222
|
Learner,
You need to put the drive letter of where your mqsc cmd file is:
You wrote:
Quote: |
C:\>runmqsc QMCTest </Progra~1/IBM/Websph~1/E1_ST03.txt
this is what I do and I get an error that the specified file does not exist.
|
First of all that is a UNIX path syntax, and you are using Windows.
Windows syntax is:
C:\runmqsc QMCTest <X:\Progra~1\IBM\Websph~1\E1_ST03.txt
Replace "X" with the drive letter, which is probably C:.
Not trying to flame you, but might I sugguest:
1.] A basic Windows course. The < redirect is a command common to most all distributed type OS's.
2.] Take a look at the WMQ manuals.
The System Administration Guide can be found here. Ch 4 talks about redirecting commands or writing data from a MQSC command to a file. http://publibfp.boulder.ibm.com/epubs/pdf/amqzag05.pdf
All the latest WMQ manuals can be found here:
http://www-306.ibm.com/software/integration/mqfamily/library/manualsa/manuals/crosslatest.html |
|
Back to top |
|
 |
learner |
Posted: Wed Sep 22, 2004 12:08 pm Post subject: |
|
|
Newbie
Joined: 21 Sep 2004 Posts: 6
|
thx for the links !!
I did not like your comment an dtell you one thing to err is human
and it still does not work..may be I do not know what is going on.. |
|
Back to top |
|
 |
jefflowrey |
Posted: Wed Sep 22, 2004 12:25 pm Post subject: |
|
|
Grand Poobah
Joined: 16 Oct 2002 Posts: 19981
|
what happens when you type
runmqsc
at the c:\ prompt? _________________ I am *not* the model of the modern major general. |
|
Back to top |
|
 |
offshore |
Posted: Wed Sep 22, 2004 12:26 pm Post subject: |
|
|
 Master
Joined: 20 Jun 2002 Posts: 222
|
Are you positive that E1_ST03.txt is out there?
I would try the following:
Open up a CMD prompt window and type in the path:
IE:
C:\> C:\Progra~1\IBM\Websph~1\E1_ST03.txt and press ENTER.
If the file is really there it should open in notepad, otherwise it should return something like
'C:\Progra~1\IBM\Websph~1\E1_ST03.txt 'is not recognized as an internal or external command, operable program or batch file.
In that case I would open up my computer and drill down the path and verify that the file is really there.
Perhaps that comment was a little ruff, for that I apologize......been a long day. |
|
Back to top |
|
 |
kirani |
Posted: Wed Sep 22, 2004 10:57 pm Post subject: |
|
|
Jedi Knight
Joined: 05 Sep 2001 Posts: 3779 Location: Torrance, CA, USA
|
Use Windows Search feature to find that file on your disk. It's be easy for you to copy the file to C:\> directory. This way you don't have to type-in complete path when running runmqsc command. _________________ Kiran
IBM Cert. Solution Designer & System Administrator - WBIMB V5
IBM Cert. Solutions Expert - WMQI
IBM Cert. Specialist - WMQI, MQSeries
IBM Cert. Developer - MQSeries
|
|
Back to top |
|
 |
|