Author |
Message
|
AmitN |
Posted: Thu Apr 04, 2013 6:18 pm Post subject: Data conversion from EBCDIC not happening |
|
|
Novice
Joined: 04 Apr 2013 Posts: 10
|
Hi All,
Am facing a problem in my system where data is coming in EBCDIC format for example - in place of SPACE we are getting 40 and for 1234 its shows F1F2F3F4.
the flow of the data is -
DB2 Event publisher publishes this data into Mainframe queue then intern it goes to remote MQ queues. And Java application in JMS reads it. It was working fine earlier but we started facing this issue not sure what caused this
We are using WebSphere MQ V6.0.2.11. At client QManager CCSID is 1208. And channel CONVERT at source is set NO.
How can i convert the data in JMS? can someone help here? Thanks in advance. |
|
Back to top |
|
 |
fjb_saper |
Posted: Thu Apr 04, 2013 8:41 pm Post subject: |
|
|
 Grand High Poobah
Joined: 18 Nov 2003 Posts: 20756 Location: LI,NY
|
First you have to check the format defined on the message.
If the MF sent the message with MQFMT_NONE there is no automatic conversion possible. If the MF sent the message with format MQFMT_STRING you should be able to see the converted text in clear.
Have fun  _________________ MQ & Broker admin |
|
Back to top |
|
 |
AmitN |
Posted: Wed Apr 10, 2013 8:53 am Post subject: |
|
|
Novice
Joined: 04 Apr 2013 Posts: 10
|
@fjb_saper
Sorry for the late reply.
Data which is coming from the source is XML format with an MQRFH2 header.. |
|
Back to top |
|
 |
zpat |
Posted: Wed Apr 10, 2013 9:14 am Post subject: |
|
|
 Jedi Council
Joined: 19 May 2001 Posts: 5866 Location: UK
|
Try using a textmessage method rather than a bytesmessage method to get the message in JMS (terminology approx). |
|
Back to top |
|
 |
AmitN |
Posted: Wed Apr 10, 2013 9:32 am Post subject: |
|
|
Novice
Joined: 04 Apr 2013 Posts: 10
|
@zpat..
We are using textmessage only to work in JMS... We are casting incoming message to textmessage to work further on it... |
|
Back to top |
|
 |
zpat |
Posted: Wed Apr 10, 2013 11:46 am Post subject: |
|
|
 Jedi Council
Joined: 19 May 2001 Posts: 5866 Location: UK
|
As far as I remember there are two methods on the GET - bytes or text.
You don't need to cast it. However I am not a JMS programmer. |
|
Back to top |
|
 |
rekarm01 |
Posted: Wed Apr 10, 2013 12:17 pm Post subject: Re: Data conversion from EBCDIC not happening |
|
|
Grand Master
Joined: 25 Jun 2008 Posts: 1415
|
AmitN wrote: |
Am facing a problem in my system where data is coming in EBCDIC format ... |
It might help to post the relevant MQMD and MQRFH2 fields (ccsid, format, etc.) for a message on the input queue, and the portion of code responsible for reading the message. |
|
Back to top |
|
 |
AmitN |
Posted: Mon Apr 15, 2013 2:40 am Post subject: |
|
|
Novice
Joined: 04 Apr 2013 Posts: 10
|
Hi All,
Here are the details -
CCSID @ Source QManager -
Coded character set ID . . : 37
MQMD Details -
** Numeric encoding of message data
15 MQMD-ENCODING PIC S9(9) BINARY VALUE 785.
** Character set identifier of message data
15 MQMD-CODEDCHARSETID PIC S9(9) BINARY VALUE 0.
** Format name of message data
15 MQMD-FORMAT PIC X(8 ) VALUE SPACES.
One correction here format of the message @EP -
Message format at Event Publisher is NOT Xml with an MQRFH2 header but
only XML. Sorry for wrong info earlier.
@Client QManager -
Client QManager CCSID is 1208.
Channel CONVERT at source is set NO.
Hope this helps. |
|
Back to top |
|
 |
rekarm01 |
Posted: Mon Apr 15, 2013 3:54 am Post subject: |
|
|
Grand Master
Joined: 25 Jun 2008 Posts: 1415
|
AmitN wrote: |
Code: |
** Format name of message data
15 MQMD-FORMAT PIC X(8 ) VALUE SPACES. |
|
As fjb_saper mentioned earlier, that needs to be MQFMT_STRING. |
|
Back to top |
|
 |
AmitN |
Posted: Wed Apr 17, 2013 8:51 am Post subject: |
|
|
Novice
Joined: 04 Apr 2013 Posts: 10
|
Message format s set to XMl trough Db2 Event publisher, so In case of xml how the conversion should take place in MQ ? |
|
Back to top |
|
 |
Vitor |
Posted: Wed Apr 17, 2013 8:57 am Post subject: |
|
|
 Grand High Poobah
Joined: 11 Nov 2005 Posts: 26093 Location: Texas, USA
|
AmitN wrote: |
Message format s set to XMl trough Db2 Event publisher, so In case of xml how the conversion should take place in MQ ? |
XML is not magic. XML is a string of characters in an agreed format.
If the sending application can't or won't honor that and is setting (for example) "XML " as the Format field in the MQRFH2 (the MQMD for a message with an RFH2 correctly describes the Format as MQFMT_MQRFH2) then WMQ will not recognise "XML " as a format it can convert and won't convert it.
WMQ only converts messages of MQFMT_STRING type.
I would put it to you that the Format field of the RFH2 should be MQFMT_STRING and this "XML " value should be in the mcd area of the the RFH2. _________________ Honesty is the best policy.
Insanity is the best defence. |
|
Back to top |
|
 |
|