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 Java / JMS » error 2026 on OS/390

Post new topic  Reply to topic
 error 2026 on OS/390 « View previous topic :: View next topic » 
Author Message
weiyetang
PostPosted: Fri Jun 13, 2003 9:31 am    Post subject: error 2026 on OS/390 Reply with quote

Newbie

Joined: 13 Jun 2003
Posts: 1

We have a problem to run the follow code in OS/390, it failed with
MQPUT (in bold), the reason code is 2026(MQMD error). The code is working
in AIX and NT environment. Any idea what is going wrong?

byte[] correlationId = null;

// Setup the MQ environment
if (HOSTNAME != null && !"".equals(HOSTNAME)) {
MQEnvironment.hostname = HOSTNAME;
} else {
MQEnvironment.hostname = null; // connect using bindings mode
}
if (CHANNEL != null && !"".equals(CHANNEL)) {
MQEnvironment.channel = CHANNEL;
}
MQEnvironment.properties.put(MQC.TRANSPORT_PROPERTY,
MQC.TRANSPORT_MQSERIES);


// Connect to the QManager
qManager = new MQQueueManager(Q_MANAGER_NAME);

// Setup open options
int openOptions = MQC.MQOO_OUTPUT; //MQC.MQOO_INPUT_SHARED | removed
because not supported on z/os

// Open the queue
MQQueue queue =
qManager.accessQueue(REQUEST_Q_NAME, openOptions, null, null, null);


// Set the put message options
MQPutMessageOptions pmo = new MQPutMessageOptions();

pmo.options = MQC.MQPMO_SYNCPOINT; // MQC.MQPMO_NEW_CORREL_ID
// z/OS does not support MQC.MQPMO_NEW_MSG_ID

// Create the MQ Message
MQMessage message = new MQMessage();

// Set the message format
message.format = MQC.MQFMT_STRING;

// Set the message flags
message.messageFlags = MQC.MQMT_REQUEST;


// Set the reply to queue and queue manager
message.replyToQueueName = REPLY_TO_Q_NAME;
message.replyToQueueManagerName = REPLY_TO_Q_MGR_NAME;

// Set the XML message in the MQ message
message.writeBytes(xmlMessage);
// message.writeString(xmlMessage);

// Put the MQ message on the queue
queue.put(message, pmo);


// Commit the transaction
qManager.commit();

// Get the correlation ID for the MQ message
// correlationId = message.correlationId;
correlationId = message.messageId;

String cID = new String(correlationId);

// Close the queue
queue.close();
Back to top
View user's profile Send private message
jefflowrey
PostPosted: Fri Jun 13, 2003 11:46 am    Post subject: Reply with quote

Grand Poobah

Joined: 16 Oct 2002
Posts: 19981

Try adding
Code:
message.setVersion(1);
before you do your put.
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic  Reply to topic Page 1 of 1

MQSeries.net Forum Index » IBM MQ Java / JMS » error 2026 on OS/390
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.