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 » MQSeries Version Problem

Post new topic  Reply to topic
 MQSeries Version Problem « View previous topic :: View next topic » 
Author Message
Dilrukshi
PostPosted: Mon Apr 29, 2002 10:02 pm    Post subject: Reply with quote

Apprentice

Joined: 28 Apr 2002
Posts: 29

Hai ,
Iam putting a message from NT to Mainframe MQSeries Queue.The Windows
NT MQSeries version is 5.1 and the Mainframe MQSeries Version is 2.1
.The client is a java program and the server is Mainframe .Through the
programi directly tried to put message into the Queue in MAinframe .

The problem i got was , there are 2 versions in message descriptor ,
the message descriptor of NT has version 2 API's whereas the message descriptor of mainframe has version 1 API's . Because of this conflict the mainframe queue refused to accept the message and it gave an error code 2026.to avoid this i thought of setting the version2 to version 1 through the setVersion() method . But the NT MQSeries version 5.1 didn't allow me to set but the NT MQSeries version 4.0 allowed me to set . Can u please tell me y version 5.1 didn't allow me to change the version of message dscriptor whereas the lower version 4.0
allowed me to change. Or am i wrong in setting the version ?

Thanks in advance




_________________
Dil
Back to top
View user's profile Send private message
kolban
PostPosted: Tue Apr 30, 2002 5:30 am    Post subject: Reply with quote

Grand Master

Joined: 22 May 2001
Posts: 1072
Location: Fort Worth, TX, USA

I think you are on the right track by using the setVersion() method of the MQMessage class. When you tried to use this, what was the result? Was an error produced?
Back to top
View user's profile Send private message
iabarca
PostPosted: Tue Apr 30, 2002 11:49 am    Post subject: Reply with quote

Newbie

Joined: 29 Apr 2002
Posts: 9

Hi,

Please can you help me? I work with NT Workstation and AS/400, I need put a message to AS/400, at the NT Workstation you are working with Server o Client, what suggest for this cases.

Thanks in advance.

Quote:

On 2002-04-29 23:02, Dilrukshi wrote:
Hai ,
Iam putting a message from NT to Mainframe MQSeries Queue.The Windows
NT MQSeries version is 5.1 and the Mainframe MQSeries Version is 2.1
.The client is a java program and the server is Mainframe .Through the
programi directly tried to put message into the Queue in MAinframe .

The problem i got was , there are 2 versions in message descriptor ,
the message descriptor of NT has version 2 API's whereas the message descriptor of mainframe has version 1 API's . Because of this conflict the mainframe queue refused to accept the message and it gave an error code 2026.to avoid this i thought of setting the version2 to version 1 through the setVersion() method . But the NT MQSeries version 5.1 didn't allow me to set but the NT MQSeries version 4.0 allowed me to set . Can u please tell me y version 5.1 didn't allow me to change the version of message dscriptor whereas the lower version 4.0
allowed me to change. Or am i wrong in setting the version ?

Thanks in advance




Back to top
View user's profile Send private message
Dilrukshi
PostPosted: Tue Apr 30, 2002 10:40 pm    Post subject: Reply with quote

Apprentice

Joined: 28 Apr 2002
Posts: 29

Hai Kolban ,
Thanku for ur reply....
I think iam right in using the setVersion() method . The same code works fine for Version 4.0 APIs . But It gives me the NullpointerException error if version 5.1 API's are used .
Iam enclosing the error
Exception in thread "main" java.lang.NullPointerException
at com.ibm.mq.MQException.<init>(MQException.java:457)
at com.ibm.mq.MQMD.setVersion(MQMD.java:439)
at MQSample2.main(MQSample2.java:47)

Can u please tell me the reason for it .......
Thanks in advance

Friendly

_________________
Dil
Back to top
View user's profile Send private message
Dilrukshi
PostPosted: Wed May 01, 2002 2:50 am    Post subject: Reply with quote

Apprentice

Joined: 28 Apr 2002
Posts: 29

Hai iabarca
Iam working with Server in the NTWorkstation . Can u be little more clear in ur Q ..

Friendly


_________________
Dil
Back to top
View user's profile Send private message
kolban
PostPosted: Wed May 01, 2002 5:23 am    Post subject: Reply with quote

Grand Master

Joined: 22 May 2001
Posts: 1072
Location: Fort Worth, TX, USA

Can you post the code for your application?
Back to top
View user's profile Send private message
Dilrukshi
PostPosted: Wed May 01, 2002 6:43 am    Post subject: Reply with quote

Apprentice

Joined: 28 Apr 2002
Posts: 29

Hai Kolban,
This is the code


// This sample runs as an applet using the appletviewer and HTML file,
// using the command :-//
//appletviewer MQSample.html

import com.ibm.mq.*;
import java.io.*;
//import MyReceiveExit;


public class MQSample
{
public void MQSample(){}

public static void main(String[] args)
{

try {

String hostname = "207.221.11.240";
String channel = "SYSTEM.DEF.SVRCONN";
String qManager = "MQA1";
MQQueueManager qMgr;
String s = "";

MQEnvironment.hostname = hostname;
MQEnvironment.port = 1414;
MQEnvironment.channel = channel;
MQEnvironment.properties.put(MQC.TRANSPORT_PROPERTY,
MQC.TRANSPORT_MQSERIES);
MQEnvironment.properties.put(MQC.USER_ID_PROPERTY,MQEnvironment.userID);



qMgr = new MQQueueManager(qManager);

System.out.println("Connected to the queueManager");

int openOptions = MQC.MQOO_INPUT_AS_Q_DEF | MQC.MQOO_OUTPUT ;


MQQueue system_default_local_queue =
qMgr.accessQueue("TESTQUEUE1", openOptions, null, null, null);


MQMessage hello_world = new MQMessage();

hello_world.setVersion(MQC.MQMD_VERSION_1);

s = "Hai ";

hello_world.writeString(s);
MQPutMessageOptions pmo = new MQPutMessageOptions();
hello_world.writeString(s);
system_default_local_queue.put(hello_world,pmo);
System.out.println("The message put is " + s);
System.out.println("PUT message is SUCCESS: ");

system_default_local_queue.close();

qMgr.disconnect();
}
catch (MQException ex)
{
System.out.println("An MQSeries error occurred : Completion code " +
ex.completionCode + " Reason code " + ex.reasonCode);
}

catch (java.io.IOException ex)
{
System.out.println("An error occurred whilst writing to the message buffer: " + ex);
}
}
}


Thanks for all ur help in advance



_________________
Dil
Back to top
View user's profile Send private message
iabarca
PostPosted: Wed May 01, 2002 10:09 am    Post subject: Reply with quote

Newbie

Joined: 29 Apr 2002
Posts: 9

Hi Dil,

I am working with NT Workstation like Client and AS/400 like Server, and an app in VB, this app must run at NTWorkstation, I need reset the default parameters to:

Manager : I400MIAMI.RIBS
Request queue : MI.RIBS.REQUEST ( to send their request to )
Reply queue : MI.RIBS.REPLY ( to receive reply from )
Channel name : SERVER.TO.I400MIAMI

for I can work, but I don't know how I do that, Do you have some idea?.

Thanks in advance.

Back to top
View user's profile Send private message
kolban
PostPosted: Wed May 01, 2002 10:22 am    Post subject: Reply with quote

Grand Master

Joined: 22 May 2001
Posts: 1072
Location: Fort Worth, TX, USA

See the README for MQ V5.1 CSDs ... at

ftp://ftp.software.ibm.com/software/mqseries/fixes/winnt51/README.TXT

You will find the following line:

38528 - MQMessage.setVersion() rejected MQMD_VERSION_1.

Suggest that you install and apply latest CSD ... see

http://www-4.ibm.com/software/ts/mqseries/support/summary/wnt.html
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 » General Discussion » MQSeries Version Problem
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.