Discussion:
MQRC_ALREADY_CONNECTED
Ward Able, Grant
2013-09-19 14:59:56 UTC
Permalink
Hi MQListers,

Scenario:
DB2 stored procedure does an MQCONN, all the MQ work it needs to followed by an MQDISC, all MQRC(0). Before the WLM exits, new work comes in and another MQCONN is issued. At this point MQRC_ALREADY_CONNECTED (2002) is returned.

My question is this: is this valid and the program allowed to continue? Or should it be considered as an error?


Regards - Grant


Grant Ward Able
Senior Systems Architect
Transaction and Messaging Technologies
DTCC London
***@dtcc.com<mailto:***@dtcc.com>
Phone 0207 650 1496

[cid:***@01CE0F89.AB571430]<http://www.dtcc.com/>



<BR>_____________________________________________________________
<FONT size=2><BR>
DTCC DISCLAIMER: This email and any files transmitted with it are
confidential and intended solely for the use of the individual or
entity to whom they are addressed. If you have received this email
in error, please notify us immediately and delete the email and any
attachments from your system. The recipient should check this email
and any attachments for the presence of viruses. The company
accepts no liability for any damage caused by any virus transmitted
by this email.</FONT>

To unsubscribe, write to LISTSERV-0lvw86wZMd9k/bWDasg6f+***@public.gmane.org and,
in the message body (not the subject), write: SIGNOFF MQSERIES
Instructions for managing your mailing list subscription are provided in
the Listserv General Users Guide available at http://www.lsoft.com
Archive: http://listserv.meduniwien.ac.at/archives/mqser-l.html
Bruce Lerner
2013-09-19 18:54:56 UTC
Permalink
It's valid. MQRC_ALREADY_CONNECTED means that there is already a valid
connection-handle from this application to the named queue manager. Do
further MQI calls succeed?

To unsubscribe, write to LISTSERV-0lvw86wZMd9k/bWDasg6f+***@public.gmane.org and,
in the message body (not the subject), write: SIGNOFF MQSERIES
Andrew Hickson
2013-09-19 20:03:47 UTC
Permalink
Are you linking with the correct libraries ?
If this is a multi-threaded application then it would be valid for two
concurrent connection on separate threads, and that would require that you
linked with the _r variants of the MQ libraries.
Alternatively, if this is single threaded, and you want to manage multiple
contexts under the same thread, you could use one of the
MQCNO_HANDLE_SHARE_* flags.



From: Bruce Lerner <brucelerner-JUB/***@public.gmane.org>
To: MQSERIES-JX7+OpRa80QeFbOYke1v4oOpTq8/***@public.gmane.org
Date: 19/09/2013 19:55
Subject: Re: MQRC_ALREADY_CONNECTED
Sent by: MQSeries List <MQSERIES-JX7+OpRa80QeFbOYke1v4oOpTq8/***@public.gmane.org>



It's valid. MQRC_ALREADY_CONNECTED means that there is already a valid
connection-handle from this application to the named queue manager. Do
further MQI calls succeed?

To unsubscribe, write to LISTSERV-0lvw86wZMd9k/bWDasg6f+***@public.gmane.org and,
in the message body (not the subject), write: SIGNOFF MQSERIES
Instructions for managing your mailing list subscription are provided in
the Listserv General Users Guide available at http://www.lsoft.com
Archive: http://listserv.meduniwien.ac.at/archives/mqser-l.html



Unless stated otherwise above:
IBM United Kingdom Limited - Registered in England and Wales with number
741598.
Registered office: PO Box 41, North Harbour, Portsmouth, Hampshire PO6 3AU

To unsubscribe, write to LISTSERV-0lvw86wZMd9k/bWDasg6f+***@public.gmane.org and,
in the message body (not the subject), write: SIGNOFF MQSERIES
Instructions for managing your mailing list subscription are provided in
the Listserv General Users Guide available at http://www.lsoft.com
Archive: http://listserv.meduniwien.ac.at/archives/mqser-l.html
Ward Able, Grant
2013-09-20 09:39:43 UTC
Permalink
Bruce, I don't know. I always expected that after having done an MQDISC, if I did an MQCONN then it would simply work. How can I get ALREADY CONNECTED, if I have previously done a disconnect? I understand from the InfoCentre that the hConn returned is the same as returned by the previous MQCONN, but if I had done an MQDISC, how can I be ALREADY connected?

Maybe it is just the pedant in me that dislikes the "ALREADY" connected .....

I have asked the applications guys to test what happens if they accept this & continue processing.


Regards - Grant.
Telephone Internal: 201496 (London)
Telephone External: +44 (0)207 650 1496


-----Original Message-----
From: MQSeries List [mailto:***@LISTSERV.MEDUNIWIEN.AC.AT] On Behalf Of Bruce Lerner
Sent: 19 September 2013 19:55
To: ***@LISTSERV.MEDUNIWIEN.AC.AT
Subject: Re: MQRC_ALREADY_CONNECTED

It's valid. MQRC_ALREADY_CONNECTED means that there is already a valid connection-handle from this application to the named queue manager. Do further MQI calls succeed?

To unsubscribe, write to ***@LISTSERV.MEDUNIWIEN.AC.AT and, in the message body (not the subject), write: SIGNOFF MQSERIES Instructions for managing your mailing list subscription are provided in the Listserv General Users Guide available at http://www.lsoft.com
Archive: http://listserv.meduniwien.ac.at/archives/mqser-l.html
<BR>_____________________________________________________________
<FONT size=2><BR>
DTCC DISCLAIMER: This email and any files transmitted with it are
confidential and intended solely for the use of the individual or
entity to whom they are addressed. If you have received this email
in error, please notify us immediately and delete the email and any
attachments from your system. The recipient should check this email
and any attachments for the presence of viruses. The company
accepts no liability for any damage caused by any virus transmitted
by this email.</FONT>

To unsubscribe, write to LISTSERV-0lvw86wZMd9k/bWDasg6f+***@public.gmane.org and,
in the message body (not the subject), write: SIGNOFF MQSERIES
Ward Able, Grant
2013-09-20 09:45:00 UTC
Permalink
Andrew, this is with COBOL on z/OS, so I am not sure that the _r variants are valid here.

Regards - Grant.
Telephone Internal: 201496 (London)
Telephone External: +44 (0)207 650 1496

From: MQSeries List [mailto:***@LISTSERV.MEDUNIWIEN.AC.AT] On Behalf Of Andrew Hickson
Sent: 19 September 2013 21:04
To: ***@LISTSERV.MEDUNIWIEN.AC.AT
Subject: Re: MQRC_ALREADY_CONNECTED

Are you linking with the correct libraries ?
If this is a multi-threaded application then it would be valid for two concurrent connection on separate threads, and that would require that you linked with the _r variants of the MQ libraries.
Alternatively, if this is single threaded, and you want to manage multiple contexts under the same thread, you could use one of the MQCNO_HANDLE_SHARE_* flags.



From: Bruce Lerner <***@CHARTER.NET<mailto:***@CHARTER.NET>>
To: ***@listserv.meduniwien.ac.at<mailto:***@listserv.meduniwien.ac.at>
Date: 19/09/2013 19:55
Subject: Re: MQRC_ALREADY_CONNECTED
Sent by: MQSeries List <***@listserv.meduniwien.ac.at<mailto:***@listserv.meduniwien.ac.at>>
________________________________



It's valid. MQRC_ALREADY_CONNECTED means that there is already a valid
connection-handle from this application to the named queue manager. Do
further MQI calls succeed?

To unsubscribe, write to ***@LISTSERV.MEDUNIWIEN.AC.AT<mailto:***@LISTSERV.MEDUNIWIEN.AC.AT> and,
in the message body (not the subject), write: SIGNOFF MQSERIES
Instructions for managing your mailing list subscription are provided in
the Listserv General Users Guide available at http://www.lsoft.com<http://www.lsoft.com/>
Archive: http://listserv.meduniwien.ac.at/archives/mqser-l.html



Unless stated otherwise above:
IBM United Kingdom Limited - Registered in England and Wales with number 741598.
Registered office: PO Box 41, North Harbour, Portsmouth, Hampshire PO6 3AU
________________________________
List Archive<http://listserv.meduniwien.ac.at/archives/mqser-l.html> - Manage Your List Settings<http://listserv.meduniwien.ac.at/cgi-bin/wa?SUBED1=mqser-l&A=1> - Unsubscribe<mailto:***@LISTSERV.MEDUNIWIEN.AC.AT?subject=Unsubscribe&BODY=signoff%20mqseries>

Instructions for managing your mailing list subscription are provided in the Listserv General Users Guide available at http://www.lsoft.com<http://www.lsoft.com/resources/manuals.asp>


<BR>_____________________________________________________________
<FONT size=2><BR>
DTCC DISCLAIMER: This email and any files transmitted with it are
confidential and intended solely for the use of the individual or
entity to whom they are addressed. If you have received this email
in error, please notify us immediately and delete the email and any
attachments from your system. The recipient should check this email
and any attachments for the presence of viruses. The company
accepts no liability for any damage caused by any virus transmitted
by this email.</FONT>

To unsubscribe, write to LISTSERV-0lvw86wZMd9k/bWDasg6f+***@public.gmane.org and,
in the message body (not the subject), write: SIGNOFF MQSERIES
Instructions for managing your mailing list subscription are provided in
the Listserv General Users Guide available at http://www.lsoft.com
Archive: http://listserv.meduniwien.ac.at/archives/mqser-l.html

Loading...