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 API Support » MQCONN and asterisk

Post new topic  Reply to topic
 MQCONN and asterisk « View previous topic :: View next topic » 
Author Message
koami
PostPosted: Thu Aug 12, 2004 3:55 pm    Post subject: MQCONN and asterisk Reply with quote

Novice

Joined: 28 Apr 2004
Posts: 10
Location: San Marcos, California - USA

Hello!

Is there a way to MQCONN to an asterisk (*) in the distributed environment (Windows or AIX)?

I have a Client application I would like to modify to connect to an asterisk instead of a specific qmgr. I want the application to parse the MQClient Channel table and connect to the first Qmgr in the table; and if that queue manager is down, go down to the next one in the table and so on.

I am using amqsputc sample code for testing, I have changed the "qmgr" command line argument with "*" in the code.

When tried to run it without specifying a Qmgrname (amqsputc "QUEUENAME" ) I was getting the following:
"MQRC_Q_MGR_NOT_AVAILABLE"

Thanks
Back to top
View user's profile Send private message Visit poster's website
Missam
PostPosted: Thu Aug 12, 2004 9:11 pm    Post subject: Reply with quote

Chevalier

Joined: 16 Oct 2003
Posts: 424

well first of all this is a question to be posted in API Support form.
Quote:

I am using amqsputc sample code for testing, I have changed the "qmgr" command line argument with "*" in the code.

When tried to run it without specifying a Qmgrname (amqsputc "QUEUENAME" ) I was getting the following:
"MQRC_Q_MGR_NOT_AVAILABLE"



Using * in the sence,you (logically) know * means to connect to any queue manager in the client defintion table.but the application programs doesn't under stand that.they think that * is another character and try to connect to QueueManager Named '*' and fail to connect giving the error "MQRC_Q_MGR_NOT_AVAILABLE".so you need to come up with an implementation,when ever you see a * in the name of the queue manager.get the QM's listed in Client Channel Definition table and try connecting each one until you connect to one of them.
Back to top
View user's profile Send private message
PeterPotkay
PostPosted: Fri Aug 13, 2004 4:43 pm    Post subject: Reply with quote

Poobah

Joined: 15 May 2001
Posts: 7722

Applications can code "*" or "*QMname" in the MQCONN call.

When an app issues an MQCONN call, and a channel table is used, MQ starts searching the channel table alphabetically by channel name. It will attempt to use a particulat entry in the channel table using the following rules:

If you coded a qm name in the MQCONN call ("QM1"), you are telling MQ to only try entries in the channel table that have that exact name ("QM1") in the CLNTCONN definition. It will ignore any entries in the table that have any other QM name specified, and it will ignore any entries that have no QM name specified. It will try all those that meet that criteria, alphabetically by channel name, until a succeful connection is made or until it runs out of eligible entries in the table.

If you coded a qm name in the MQCONN call with an * ("*QM1"), you are telling MQ to only try entries in the channel table that have that any QM name ("QM1" or "QM2") in the CLNTCONN definition. It will ignore any entries in the table that have a blank QM parameter. It will try all those that meet that criteria, alphabetically by channel name, until a succeful connection is made or until it runs out of eligible entries in the table.


If you coded no qm name in the MQCONN call or only an * ("*" or " "), you are telling MQ to only try entries in the channel table that have NO QM name in the CLNTCONN definition. It will ignore any entries in the table that have a filled in QM parameter. It will try all those that meet that criteria, alphabetically by channel name, until a succeful connection is made or until it runs out of eligible entries in the table. You will only connect to a QM if it is designated as the default QM on the target server.

How amqsputc reacts when it sees a * on the command line, I don't know. But if it recognizes it internally and supplies it on its MQCONN call, the rules above apply.
_________________
Peter Potkay
Keep Calm and MQ On
Back to top
View user's profile Send private message
kirani
PostPosted: Fri Aug 13, 2004 10:14 pm    Post subject: Reply with quote

Jedi Knight

Joined: 05 Sep 2001
Posts: 3779
Location: Torrance, CA, USA

Please post API related questions into MQ API Forum.

[Moving to API Support Forum]
_________________
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
View user's profile Send private message Visit poster's website
Display posts from previous:   
Post new topic  Reply to topic Page 1 of 1

MQSeries.net Forum Index » IBM MQ API Support » MQCONN and asterisk
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.