Author |
Message
|
mqexplorer |
Posted: Wed Nov 21, 2007 9:59 am Post subject: Question about amqsputc |
|
|
Novice
Joined: 02 Aug 2007 Posts: 17
|
Hi all
I have a quick question about amqsputc in /opt/mqm/samp/bin
I run it with amqsputc <QUEUENAME> <QMGR>. How does it figure out which client connection channel to use? I have 3 client connection channels and it looks like it tries to use at least 2 of them??
Thanks |
|
Back to top |
|
 |
bower5932 |
Posted: Wed Nov 21, 2007 10:15 am Post subject: |
|
|
 Jedi Knight
Joined: 27 Aug 2001 Posts: 3023 Location: Dallas, TX, USA
|
I believe there is a discussion in the clients manual on how things are found in the table. |
|
Back to top |
|
 |
jeevan |
Posted: Wed Nov 21, 2007 10:29 am Post subject: |
|
|
Grand Master
Joined: 12 Nov 2005 Posts: 1432
|
The easiest way to get this to work is to set up an environment variable
called MQSERVER. Set it to something like this:
SET MQSERVER=SYSTEM.DEF.SVRCONN/TCP/hostname (port)
the first part if the name of a 'svrconn' channel, the second is
the protocol used, and the third is the 'connection name'
consisting of either an ip address or hostname or dsn name,
followed by the port number. By default, MQ uses 1414.
Hope, this will help |
|
Back to top |
|
 |
RogerLacroix |
Posted: Wed Nov 21, 2007 10:46 am Post subject: |
|
|
 Jedi Knight
Joined: 15 May 2001 Posts: 3264 Location: London, ON Canada
|
Hi,
It uses whatever you have set for MQSERVER. (or MQCHLTAB & MQCHLLIB).
Regards,
Roger Lacroix
Capitalware Inc. _________________ Capitalware: Transforming tomorrow into today.
Connected to MQ!
Twitter |
|
Back to top |
|
 |
Vitor |
Posted: Wed Nov 21, 2007 10:48 am Post subject: |
|
|
 Grand High Poobah
Joined: 11 Nov 2005 Posts: 26093 Location: Texas, USA
|
jeevan wrote: |
SET MQSERVER=SYSTEM.DEF.SVRCONN/TCP/hostname (port)
the first part if the name of a 'svrconn' channel, the second is
the protocol used, and the third is the 'connection name'
consisting of either an ip address or hostname or dsn name,
followed by the port number. By default, MQ uses 1414.
|
All true, but it's not a good idea to use the SYSTEM objects or the default ports.
Also not compatable if the poster has already got 3 possible channels to use, especially if they're on 3 different boxes! _________________ Honesty is the best policy.
Insanity is the best defence. |
|
Back to top |
|
 |
mqexplorer |
Posted: Wed Nov 21, 2007 10:51 am Post subject: |
|
|
Novice
Joined: 02 Aug 2007 Posts: 17
|
Thanks for all the replies. I am not using MQSERVER. I am using MQCHLTAB and MQCHLLIB. The process itself works fine (well I am getting an SSL problem and thats what I am trying to figure out but it works fine for non-SSL). I was just curious as to how it figures out which client connection channel it uses. Looks like it uses 2 channels out of 3 in there...one custom channel I created and also SYSTEM.DEF.SVRCONN(CLNTCONN)
Thanks |
|
Back to top |
|
 |
JosephGramig |
Posted: Wed Nov 21, 2007 10:59 am Post subject: |
|
|
 Grand Master
Joined: 09 Feb 2006 Posts: 1244 Location: Gold Coast of Florida, USA
|
If you use CONNX, that will override everything.
If you set MQSERVER, that will override everything else for client.
If you don't set MQCHLLIB or MQCHLTAB, it will look for the AMQCHCHL.TAB in the top installation directory. If you set either of those, then it will look for what and where you told it.
If it finds a valid CCDT, it will always use the first channel (for the specified QMGR) lexically in order what works (likely the first one).
Here's the link to this and more:
http://publib.boulder.ibm.com/infocenter/wmqv6/v6r0/index.jsp?topic=/com.ibm.mq.csqzaf.doc/amq25da.htm _________________ Joseph
Administrator - IBM WebSphere MQ (WMQ) V6.0, IBM WebSphere Message Broker (WMB) V6.1 & V6.0
Solution Designer - WMQ V6.0
Solution Developer - WMB V6.1 & V6.0, WMQ V5.3 |
|
Back to top |
|
 |
JosephGramig |
Posted: Wed Nov 21, 2007 11:03 am Post subject: |
|
|
 Grand Master
Joined: 09 Feb 2006 Posts: 1244 Location: Gold Coast of Florida, USA
|
Hmmm, SSL. Be sure to only create/modify the CCDT with the runmqsc command and not MO72 (mqsc -n). Well, you can use the MQ Explorer too. _________________ Joseph
Administrator - IBM WebSphere MQ (WMQ) V6.0, IBM WebSphere Message Broker (WMB) V6.1 & V6.0
Solution Designer - WMQ V6.0
Solution Developer - WMB V6.1 & V6.0, WMQ V5.3 |
|
Back to top |
|
 |
PeterPotkay |
Posted: Wed Nov 21, 2007 11:14 am Post subject: |
|
|
 Poobah
Joined: 15 May 2001 Posts: 7722
|
JosephGramig wrote: |
If it finds a valid CCDT, it will always use the first channel (for the specified QMGR) lexically in order what works (likely the first one). |
WebSphere MQ searches the client channel definition table, in alphabetic channel name order, looking in the queue manager name (QMNAME) field for an entry corresponding to the one given in the MQCONN call. _________________ Peter Potkay
Keep Calm and MQ On |
|
Back to top |
|
 |
mqexplorer |
Posted: Wed Nov 21, 2007 11:21 am Post subject: |
|
|
Novice
Joined: 02 Aug 2007 Posts: 17
|
|
Back to top |
|
 |
JosephGramig |
Posted: Wed Nov 21, 2007 11:54 am Post subject: |
|
|
 Grand Master
Joined: 09 Feb 2006 Posts: 1244 Location: Gold Coast of Florida, USA
|
Peter,
It does say Alphabetical, but the channel name is not composed only of the letters of the alphabet so that makes it lexical.
Quote: |
Lexical order refers to how string values are compared, which is basically alphabetical order (or dictionary order) with a slight twist. Whitespace comes first in the alphabet, then symbols . Next are digits , then capital letters , and then lower-case letters . |
If I were a bet'n man, I would say it is the lexical order of your code page.  _________________ Joseph
Administrator - IBM WebSphere MQ (WMQ) V6.0, IBM WebSphere Message Broker (WMB) V6.1 & V6.0
Solution Designer - WMQ V6.0
Solution Developer - WMB V6.1 & V6.0, WMQ V5.3 |
|
Back to top |
|
 |
PeterPotkay |
Posted: Wed Nov 21, 2007 12:06 pm Post subject: |
|
|
 Poobah
Joined: 15 May 2001 Posts: 7722
|
I bet you are right!  _________________ Peter Potkay
Keep Calm and MQ On |
|
Back to top |
|
 |
|