Author |
Message
|
FrankBo |
Posted: Mon Mar 13, 2006 10:58 am Post subject: 000002103 Message |
|
|
Apprentice
Joined: 08 Dec 2005 Posts: 36
|
Additional Message Information
From . . . . . . . . . : QMQM Severity . . . . . . . : 80
Message type . . . . . : Information
Date sent . . . . . . : 03/13/06 Time sent . . . . . . : 13:30:09
Message . . . . : PGM750R: Cannot connect to queue manager COP.ASSGN.QM1.
Reason code = 000002103.
Has anyone come across this message? Any idea what could b/causing it and how to resolve?
Thanks |
|
Back to top |
|
 |
wschutz |
Posted: Mon Mar 13, 2006 11:05 am Post subject: |
|
|
 Jedi Knight
Joined: 02 Jun 2005 Posts: 3316 Location: IBM (retired)
|
2103 = ANOTHER_Q_MGR_CONNECTED...
what command is this? _________________ -wayne |
|
Back to top |
|
 |
sandiksk |
Posted: Mon Mar 13, 2006 11:16 am Post subject: |
|
|
Centurion
Joined: 08 Jun 2005 Posts: 133
|
Saw this in the messages book
2103 X’0837’ MQRC_ANOTHER_Q_MGR_CONNECTED
An MQCONN or MQCONNX call was issued, but the thread or process is already connected
to a different queue manager. The thread or process can connect to only one queue manager
at a time.
On z/OS, this reason code does not occur.
On Windows, MTS objects do not receive this reason code, as connections to other queue
managers are allowed.
Corrective action: Use the MQDISC call to disconnect from the queue manager that is already
connected, and then issue the MQCONN or MQCONNX call to connect to the new queue
manager.
Disconnecting from the existing queue manager will close any queues that are currently open;
it is recommended that any uncommitted units of work should be committed or backed out
before the MQDISC call is issued. |
|
Back to top |
|
 |
FrankBo |
Posted: Wed Mar 15, 2006 10:41 am Post subject: 000002103 Message |
|
|
Apprentice
Joined: 08 Dec 2005 Posts: 36
|
I have a multi threaded job that's trying to connect to different q managers. The process is the web opens the first qm, then the 2nd pgm opens another qm. I get msg 2103 when the process runs.
Is there a way to use MQDISC so as to disconnect from the first qm?
If I use MQDISC does that shut down or close the first qm?
Thanks |
|
Back to top |
|
 |
mvic |
Posted: Wed Mar 15, 2006 10:54 am Post subject: Re: 000002103 Message |
|
|
 Jedi
Joined: 09 Mar 2004 Posts: 2080
|
FrankBo wrote: |
I have a multi threaded job that's trying to connect to different q managers. |
Have you tried binding your program to the "client" library - ie. the one that uses TCP/IP to connect to the qmgr? If you use the client, you should be able to connect to a different qmgr on each thread.
Disclaimer: this appear to be iSeries (ie. AS/400) and this is a platform I am mostly unfamiliar with. So the above advice might be wrong
Quote: |
If I use MQDISC does that shut down or close the first qm? |
It disconnects from the queue manager. Please check out the description in the Application Programming Reference. |
|
Back to top |
|
 |
jefflowrey |
Posted: Wed Mar 15, 2006 10:55 am Post subject: |
|
|
Grand Poobah
Joined: 16 Oct 2002 Posts: 19981
|
By default, connection handles are not shareable between threads. Each thread can, at most, have one connection handle in it.
If you share your connection handles between threads, then any MQDISC on that handle will close the connection for all threads.
You are likely trying to put all your MQ specific code in one thread, and trying to open multiple queue managers in that one thread. Which, as you've found, doesn't work.
What will work is if you make sure that each thread opens it's own connection to the queue manager that it needs - and if you need to pass information between queue managers, then you need to pass that information between threads. _________________ I am *not* the model of the modern major general. |
|
Back to top |
|
 |
FrankBo |
Posted: Thu Mar 16, 2006 10:49 am Post subject: |
|
|
Apprentice
Joined: 08 Dec 2005 Posts: 36
|
IBM told me to use MQDISC...but that will close any open queues? That's not what I wanted, I just wanted the connection to end and access to a new queue started. |
|
Back to top |
|
 |
wschutz |
Posted: Thu Mar 16, 2006 10:54 am Post subject: |
|
|
 Jedi Knight
Joined: 02 Jun 2005 Posts: 3316 Location: IBM (retired)
|
FrankBo wrote: |
IBM told me to use MQDISC...but that will close any open queues? That's not what I wanted, I just wanted the connection to end and access to a new queue started. |
Yes, MQDISC both commits any outstanding units-of-work and closes any open queues.
You want to access a new queue manager? The MQCONN again to the next queue manager. You can't keep queues open across MQDISC/MQCONN. _________________ -wayne |
|
Back to top |
|
 |
FrankBo |
Posted: Thu Mar 16, 2006 11:11 am Post subject: |
|
|
Apprentice
Joined: 08 Dec 2005 Posts: 36
|
Thanks. The programmer I'm working with used sbmjob for the 2nd thread (access to another queue) and that worked fine. |
|
Back to top |
|
 |
|