Mq Error Reason Code 2042
Contents |
RSS Feed - WebSphere MQ Support RSS Feed - Message Broker Support
MQSeries.net Forum Index » General IBM MQ Support » reason code 2042 reason code 2042 « View previous topic :: View next topic » Author Message chris boehnke Posted: Mon Nov 09, 2009 11:45 am Post subject: reason code 2042 PartisanJoined: 25 Jul 2006Posts: 369 Hi Guys, We have our application getting messages from a Mainframe queue manager. When they try getting messages they are getting 2042 http://www.ibm.com/support/knowledgecenter/SSFKSJ_7.5.0/com.ibm.mq.tro.doc/q041130_.htm reason code. I checked the MQ Options and found that application is using MQOO_INPUT_SHARED. I am not sure what else is causing this error. MQ version 6.0.2.0, z/OS can you guys throw some light on this. Back to top Vitor Posted: Mon Nov 09, 2009 12:17 pm Post subject: Re: reason code 2042 Grand High PoobahJoined: 11 Nov 2005Posts: 23698Location: Ohio, USA chris boehnke wrote: I checked the MQ Options and found http://www.mqseries.net/phpBB/viewtopic.php?t=51507&sid=87a0b9bc58377071bd4f1327cd8caecb that application is using MQOO_INPUT_SHARED. I am not sure what else is causing this error. Another application using input exclusive? (Though frankly I'd have expected a different reason code for that). Something else accessing the queue? Have you checked the queue or just the application that's supposed to be using the queue?_________________Honesty is the best policy. Insanity is the best defence. Back to top chris boehnke Posted: Mon Nov 09, 2009 12:54 pm Post subject: Re: reason code 2042 PartisanJoined: 25 Jul 2006Posts: 369 Vitor wrote: chris boehnke wrote: I checked the MQ Options and found that application is using MQOO_INPUT_SHARED. I am not sure what else is causing this error. Another application using input exclusive? (Though frankly I'd have expected a different reason code for that). Something else accessing the queue? Have you checked the queue or just the application that's supposed to be using the queue? I checked with only application and the options are shared. Is there a possibility like application got disconnected accidently and trying to open the same queue again and getting 2042? Back to top Vitor Posted: Mon Nov 09, 2009 1:08 pm Post subject: Re: reason code 2042 Grand High PoobahJoined: 11 Nov 2005Posts: 23698Location: Ohio, USA chris boehnke wrote: Is there a possibility like applicathere for a quick overview of the site Help Center Detailed answers to any questions you might have Meta Discuss the workings and policies of this site About Us Learn http://stackoverflow.com/questions/13965468/ibm-websphere-mq-2042-error more about Stack Overflow the company Business Learn more about hiring developers or posting ads with us Stack Overflow Questions Jobs Documentation Tags Users Badges Ask Question x Dismiss Join the Stack Overflow Community Stack Overflow is a community of 6.2 million programmers, just like you, helping each other. Join them; it only takes a minute: Sign up IBM WebSphere MQ 2042 error up vote 1 down vote mq error favorite I have the following code: int openOptions = MQC.MQOO_INQUIRE + MQC.MQOO_FAIL_IF_QUIESCING + MQC.MQOO_INPUT_SHARED; Which when executed, I am getting an error: com.ibm.mq.MQException: MQJE001: Completion Code 2, Reason 2042 MQJE001: Completion Code 2, Reason 2042 This happens while connecting my Java program with WebSphere MQ. Please note that the queue property is set as input shared. All help appreciated. java websphere-mq share|improve this question edited Dec 20 '12 mq error reason at 4:56 Perception 55.4k7103136 asked Dec 20 '12 at 4:44 abhinav 2216 add a comment| 1 Answer 1 active oldest votes up vote 2 down vote accepted Although the queue may be set to DEFSOPT(SHARED), this is only a default. It does not prevent a program from opening it with exclusive use. In particular, transmission queues for non-cluster channels, the command queue and other queues used by MQ system components are opened with exclusive use, regardless of the queue's default setting. Similarly, monitoring programs often open the event queues for exclusive use to ensure that other programs do not compete for messages and result in missed critical events. Is it one of the event or XMit queues? If so, you may not be able to remove the error without stopping the channel or monitoring agent. If it is a user-defined queue, use the DISPLAY QSTATUS command to see which process has it open for exclusive input, then disconnect that process. Here is an example: C:\Users\T.Rob>runmqsc QM75 5724-H72 (C) Copyright IBM Corp. 1994, 2011. ALL RIGHTS RESERVED. Starting MQSC for queue manager QM75. dis qs(system.admin.command.queue) all 1 : dis qs(system.admin.command.queue) type(handle) all AMQ8450: Display queue status details. QUEUE(SYSTEM.ADMIN.COMMAND.QUEUE) TYPE(HANDLE) APPLDESC(WebSphere MQ Command Server) A