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 » Using mutiple CONN calls

Post new topic  Reply to topic
 Using mutiple CONN calls « View previous topic :: View next topic » 
Author Message
sanjoo
PostPosted: Mon Jan 09, 2006 1:53 am    Post subject: Using mutiple CONN calls Reply with quote

Acolyte

Joined: 26 Oct 2005
Posts: 65

I have to connect to two QMs in different modes. can I connect with same MQ variables. To elaborate more -----

* OPEN INPUT QUEUE
MOVE MQOT-Q TO MQOD-OBJECTTYPE
MOVE WS-MQI-REQ-QUEUE TO MQOD-OBJECTNAME

COMPUTE WS-MQI-OBJECT-OPTIONS = MQOO-INPUT-SHARED +
MQOO-FAIL-IF-QUIESCING +
MQOO-SAVE-ALL-CONTEXT

CALL 'MQOPEN' USING WS-MQI-CONNECTION-HANDLE
WS-MQI-OBJECT-DESCRIPTOR
WS-MQI-OBJECT-OPTIONS
WS-MQI-GETOBJ-HANDLE
WS-MQI-COMPLETION-CODE
WS-MQI-REASON-CODE

IF WS-MQI-COMPLETION-CODE = MQCC-FAILED
* BUILT THE ERROR RECORD
PERFORM 2300-SEND-ERROR-MESSAGE
END-IF
*********************
* OPEN OUTPUT QUEUE
*********************
MOVE MQOT-Q TO MQOD-OBJECTTYPE
MOVE WS-MQI-REP-QUEUE TO MQOD-OBJECTNAME
COMPUTE WS-MQI-OBJECT-OPTIONS = MQOO-OUTPUT +
MQOO-FAIL-IF-QUIESCING

CALL 'MQOPEN' USING WS-MQI-CONNECTION-HANDLE
WS-MQI-OBJECT-DESCRIPTOR
WS-MQI-OBJECT-OPTIONS
WS-MQI-PUTOBJ-HANDLE
WS-MQI-COMPLETION-CODE
WS-MQI-REASON-CODE

************************************************

here can I use same variable to have connection handle. if yes then how MQ going to decide who's who?
If not; then I guess I have to use different variables .... right?
_________________
Sanjoo

Keep smiling
Back to top
View user's profile Send private message
zpat
PostPosted: Mon Jan 09, 2006 1:56 am    Post subject: Reply with quote

Jedi Council

Joined: 19 May 2001
Posts: 5866
Location: UK

One connection handle = one connection to a given queue manager

You should review whether you really need to connect to two queue managers. Generally you should connect to one and route messages to/from other queue managers using remote queues and channels.

If you are on a mainframe, then you cannot connect as a client and therefore the question does not usually arise. If your mainframe has more than one queue manager - I would ask why?

MQ application programs should be as decoupled as possible from the topology of the infrastructure.
Back to top
View user's profile Send private message
wschutz
PostPosted: Mon Jan 09, 2006 4:15 am    Post subject: Reply with quote

Jedi Knight

Joined: 02 Jun 2005
Posts: 3316
Location: IBM (retired)

You are typing "connection handle", but I suspect you mean "object handle". If you open two queues, and you want to reference them both, you need two variables to hold the handles.
_________________
-wayne
Back to top
View user's profile Send private message Send e-mail AIM Address
Display posts from previous:   
Post new topic  Reply to topic Page 1 of 1

MQSeries.net Forum Index » IBM MQ API Support » Using mutiple CONN calls
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.