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 » General Discussion » MQ Exception While opening a Queue on S390 System using CICS

Post new topic  Reply to topic
 MQ Exception While opening a Queue on S390 System using CICS « View previous topic :: View next topic » 
Author Message
naylak
PostPosted: Thu Feb 12, 2004 6:56 am    Post subject: MQ Exception While opening a Queue on S390 System using CICS Reply with quote

Apprentice

Joined: 08 Feb 2003
Posts: 47

we got an MQException with reason code 2045 while trying to open the queue for geting the message from the local queue on a Queue manager.
we are running a sample java program which fetches the message from the local queue using CICS as atransaction Manager.

when we refered the MQSeries information center for the reason code 2045 it says the reason code is some thing to do with the MessageQueue open options
we are using the following open options
int openOptions = MQC.MQOO_INPUT_AS_Q_DEF | MQC.MQOO_INQUIRE ;

. The same program when ran with out CICS as a transaction manager its working well and we could get the message.


the program is as follows.



import com.ibm.mq.*;
public class MQBrowseDemo
{
private MQQueueManager qMgr;
private String qmgrName;
private String queueName;
public void start()
{
try
{
qmgrName = "SFMC" ;
queueName = "SNDRBRAFTSEC";
System.out.println("MQBrowseDemo started...");
qMgr = new MQQueueManager(qmgrName);
int openOptions = MQC.MQOO_INPUT_AS_Q_DEF | MQC.MQOO_INQUIRE ;
MQQueue myQueue = qMgr.accessQueue(queueName, openOptions,qmgrName, null, null);
MQGetMessageOptions pmo = new MQGetMessageOptions();
pmo.options = pmo.options | MQC.MQGMO_WAIT | MQC.MQGMO_FAIL_IF_QUIESCING | MQC.MQGMO_SYNCPOINT;
MQMessage myMessage = new MQMessage();
myQueue.get(myMessage, pmo);
int MAX_UTF_MSG_LENGTH = 64000;
int intMsgLen=myMessage.getMessageLength();
String rcvdMessage =(intMsgLen<=MAX_UTF_MSG_LENGTH)?myMessage.readUTF():myMessage.readString(intMsgLen);
myQueue.close();
qMgr.disconnect();
}
catch (MQException ex)
{
System.out.println("An MQ error occurred: " + ex.completionCode + " " +ex.reasonCode);
ex.printStackTrace();
}
catch (java.lang.Exception ex)
{
System.out.println("Java exception: " + ex);
}
System.out.println("MQBrowseDemo finished...");
}
public static void main (String args ? )
{
MQBrowseDemo mySample = new MQBrowseDemo();
mySample.start();
}
Back to top
View user's profile Send private message
bower5932
PostPosted: Thu Feb 12, 2004 10:21 am    Post subject: Reply with quote

Jedi Knight

Joined: 27 Aug 2001
Posts: 3023
Location: Dallas, TX, USA

I'd double-check that your queue is truly local to your queue manager. I just encountered this error myself, and I was dealing with a qremote without realizing it.
Back to top
View user's profile Send private message Send e-mail Visit poster's website AIM Address Yahoo Messenger
Rao Adiraju
PostPosted: Sun Feb 15, 2004 2:34 pm    Post subject: Reply with quote

Newbie

Joined: 15 Feb 2004
Posts: 2
Location: Canberra, Australia

If you are saying it is working without CICS but NOT with, only difference I can think off is, the queue manager you are targeting could be different one.

A CICS region at any given time, can be connected to ONLY ONE Queue manager and that is done outside your programming control. Outside CICS, applications generally CONNECT to a nominated queue manager and then OPEN a queue. Through CICS, connection is all ready established to a specified QMGR, and applications only issue OPENs.

So just check, the QMGR CICS is talking is the same that you want to talk to.

Cheers
Back to top
View user's profile Send private message Send e-mail
Display posts from previous:   
Post new topic  Reply to topic Page 1 of 1

MQSeries.net Forum Index » General Discussion » MQ Exception While opening a Queue on S390 System using CICS
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.