Author |
Message
|
liola |
Posted: Tue Jul 19, 2011 1:27 am Post subject: MQMessage reading with java application |
|
|
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 |
|
 |
Mr Butcher |
Posted: Tue Jul 19, 2011 3:13 am Post subject: |
|
|
 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 |
|
 |
liola |
Posted: Tue Jul 19, 2011 3:41 am Post subject: |
|
|
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 |
|
 |
fjb_saper |
Posted: Tue Jul 19, 2011 1:32 pm Post subject: |
|
|
 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 |
|
 |
liola |
Posted: Wed Jul 20, 2011 12:16 am Post subject: |
|
|
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 |
|
 |
fjb_saper |
Posted: Wed Jul 20, 2011 11:26 am Post subject: |
|
|
 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 |
|
 |
rekarm01 |
Posted: Wed Jul 20, 2011 2:29 pm Post subject: |
|
|
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 |
|
 |
fjb_saper |
Posted: Wed Jul 20, 2011 7:55 pm Post subject: |
|
|
 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 |
|
 |
rekarm01 |
Posted: Sun Jul 24, 2011 9:57 am Post subject: Re: MQMessage reading with java application |
|
|
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 |
|
 |
|