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 » MQMessage reading with java application

Post new topic  Reply to topic
 MQMessage reading with java application « View previous topic :: View next topic » 
Author Message
liola
PostPosted: Tue Jul 19, 2011 1:27 am    Post subject: MQMessage reading with java application Reply with quote

Newbie

Joined: 19 Jul 2011
Posts: 3

Hi All,
we have an application sending MQMessage in EBCDIC , we read the message correctly with RFHUtil wich detects that it is EBCDIC and the systems behinds read correctly the messages.

The problems comes when reading messages either the responses from WBI-FN/ Merva or just reading our messages with the application.
We use the setting MQConstants.MQGMO_CONVERT on the GET but we are not able to read message we get :
@?z????????????????????????????z????????????????????zKKz??z????????????????
%z??z??????????????????????????????????????????????????
%??????????????????????????????????K???????????????
%????K???????????????K?????N?????K?????????????????
and so on........

we're using version 7.0.1.5 of com.ibm.mq

can you help?

Thanks in advance
Back to top
View user's profile Send private message
Mr Butcher
PostPosted: Tue Jul 19, 2011 3:13 am    Post subject: Reply with quote

Padawan

Joined: 23 May 2005
Posts: 1716

whats the format of the message? keep in mind, it must be somehting that indicates mq that this message can be converted. also check that message contend and ccsid matches.
_________________
Regards, Butcher
Back to top
View user's profile Send private message
liola
PostPosted: Tue Jul 19, 2011 3:41 am    Post subject: Reply with quote

Newbie

Joined: 19 Jul 2011
Posts: 3

Thanks fro the reply;
we have these values on sending messagges:
MESSAGETYPE =1; // Request
MQMD_FORMAT = "MQHRF2 ";

MQRFH_VERSION = 2;
MQRFH_CCSI = 500;
MQRFH_ENC = 0;
MQRFH_FORMAT = "MQSTR ";
MQRFH_FLAGS = 0;
MQRFH_CCSID = 1208;

on receiving we have:
encoding : 0
codedCharSetId : 500
format : MQSTR
flags : 0
nameValueCodedCharSetId : 1208

we are using those jars :
com.ibm.mq.jar
com.ibm.mq.headers.jar
com.ibm.mq.commonservices.jar
com.ibm.mq.jmqi.jar
com.ibm.mq.pcf.jar
com.ibm.mqjms.jar
connector.jar
dhbcore.jar
jms.jar


can you help?
Thanks in advance
Back to top
View user's profile Send private message
fjb_saper
PostPosted: Tue Jul 19, 2011 1:32 pm    Post subject: Reply with quote

Grand High Poobah

Joined: 18 Nov 2003
Posts: 20756
Location: LI,NY

Which way are you reading the message?
Java base or JMS?

Are you aware of the change in handling CCSID for the convert option.

There was a note from IBM that explained those differences... between V6 and V7.0.x.x and V7.0.1.5... I believe V7.0.1.5 handles it again like V6 used to??

is CCSID 500 installed on your receiving platform?


_________________
MQ & Broker admin
Back to top
View user's profile Send private message Send e-mail
liola
PostPosted: Wed Jul 20, 2011 12:16 am    Post subject: Reply with quote

Newbie

Joined: 19 Jul 2011
Posts: 3

Thanks for response;
I'm reading it java base;

Got it : get the bytes AND compose a string in Cp1047;

There was a note from IBM that explained those differences... between V6 and V7.0.x.x and V7.0.1.5... I believe V7.0.1.5 handles it again like V6 used to??
Do you know where I can get that note?

Many Thanks
Back to top
View user's profile Send private message
fjb_saper
PostPosted: Wed Jul 20, 2011 11:26 am    Post subject: Reply with quote

Grand High Poobah

Joined: 18 Nov 2003
Posts: 20756
Location: LI,NY

liola wrote:
Thanks for response;
I'm reading it java base;

Got it : get the bytes AND compose a string in Cp1047;

There was a note from IBM that explained those differences... between V6 and V7.0.x.x and V7.0.1.5... I believe V7.0.1.5 handles it again like V6 used to??
Do you know where I can get that note?

Many Thanks

Do a search of the IBM site and developerworks...
_________________
MQ & Broker admin
Back to top
View user's profile Send private message Send e-mail
rekarm01
PostPosted: Wed Jul 20, 2011 2:29 pm    Post subject: Reply with quote

Grand Master

Joined: 25 Jun 2008
Posts: 1415

liola wrote:
Twe have these values on sending messages:
MESSAGETYPE =1; // Request
MQMD_FORMAT = "MQHRF2 ";

MQRFH_VERSION = 2;
MQRFH_CCSI = 500;
MQRFH_ENC = 0;
MQRFH_FORMAT = "MQSTR ";
MQRFH_FLAGS = 0;
MQRFH_CCSID = 1208;

So, which is the mqrfh2 ccsid again?
Back to top
View user's profile Send private message
fjb_saper
PostPosted: Wed Jul 20, 2011 7:55 pm    Post subject: Reply with quote

Grand High Poobah

Joined: 18 Nov 2003
Posts: 20756
Location: LI,NY

I have no idea what MQRFH_CCSI is ...
I wonder if he is trying to set this MQCCSI_INHERIT...

The CCSID should really be set to the CCSID of the data...
The NameValueCCSID has a different name...

So from what I can read in his code, he is setting the CCSID to 1208 instead of 500...

MQ V7 has some nice helper classes for the headers see
the one for the RFH2 here


_________________
MQ & Broker admin
Back to top
View user's profile Send private message Send e-mail
rekarm01
PostPosted: Sun Jul 24, 2011 9:57 am    Post subject: Re: MQMessage reading with java application Reply with quote

Grand Master

Joined: 25 Jun 2008
Posts: 1415

When a message has an MQRFH2 header (MQMD->MQRFH2->data), MQGET convert will convert the MQRFH2 header, not the data.

liola wrote:
Got it : get the bytes AND compose a string in Cp1047;

Cp1047? That doesn't match either ccsid=500 or ccsid=1208.
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 » MQMessage reading with java application
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.