|
RSS Feed - WebSphere MQ Support
|
RSS Feed - Message Broker Support
|
|
|
Where to specify server and port in amqsput from shell scrip |
« View previous topic :: View next topic » |
Author |
Message
|
sumithar |
Posted: Tue Apr 18, 2017 12:34 pm Post subject: Where to specify server and port in amqsput from shell scrip |
|
|
Apprentice
Joined: 13 Jun 2008 Posts: 47
|
Hi- Am forced to get my feet with both shell scripting and mq at the same time.
I researched and found I could use amqsput command from the terminal or shell script to put a message on a queue.
This is one such
Code: |
/opt/mqm/samp/bin/amqsput QUEUE_NAME QUEUE_MANAGER_NAME |
I got my sysadm to rpm the sample codepack.
I could not find any examples on how I specify the host and port for the queue manager?
I tried by specifying MQSERVER via an export command like so
Code: |
$ export MQSERVER="X.Y.SVRCONN/TCP/hostname(1515)" |
followed by
Code: |
$ amqsput QUEUENAME MQSERVER |
but I got a 2058 error which is a bad queue manager name. I"ve checked the queue manager name and I can't see any issue there
Any suggestions? |
|
Back to top |
|
|
fjb_saper |
Posted: Tue Apr 18, 2017 1:13 pm Post subject: |
|
|
Grand High Poobah
Joined: 18 Nov 2003 Posts: 20729 Location: LI,NY
|
You missed the fact where you have to use amqsputc for the client version.
Most client versions of the sample programs finish with the letter c.
Have fun _________________ MQ & Broker admin |
|
Back to top |
|
|
sumithar |
Posted: Tue Apr 18, 2017 6:16 pm Post subject: |
|
|
Apprentice
Joined: 13 Jun 2008 Posts: 47
|
|
Back to top |
|
|
bruce2359 |
Posted: Tue Apr 18, 2017 7:05 pm Post subject: |
|
|
Poobah
Joined: 05 Jan 2008 Posts: 9442 Location: US: west coast, almost. Otherwise, enroute.
|
The stackoverflow URL is for using amqsput sample. amqsput uses server-bindings, which means it MQCONNECTs cross-memory - to a local qmgr in the same o/s.
Amqsputc is bound to client-bindings libraries. MQCONNECTs are cross-network. As such, ipaddress(port) needs to be supplied.
Many samples come in the two flavors (flavours), server- and client-bindings. _________________ I like deadlines. I like to wave as they pass by.
ב''ה
Lex Orandi, Lex Credendi, Lex Vivendi. As we Worship, So we Believe, So we Live. |
|
Back to top |
|
|
PaulClarke |
Posted: Tue Apr 18, 2017 10:38 pm Post subject: |
|
|
Grand Master
Joined: 17 Nov 2005 Posts: 1002 Location: New Zealand
|
You wrote that you tried the command
Code: |
amqsput QUEUENAME MQSERVER |
but what you should have tried is just
You can specify the Queue Manager as the second parameter but there's not really any point in this case since the MQSERVER environment variable should be pointing at the right Queue Manager. If you progress to using the CCDT then you may well want to add the Queue Manager name parameter.
Cheers,
Paul. _________________ Paul Clarke
MQGem Software
www.mqgem.com |
|
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
|
|
|
|