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 » Data conversion from EBCDIC not happening

Post new topic  Reply to topic
 Data conversion from EBCDIC not happening « View previous topic :: View next topic » 
Author Message
AmitN
PostPosted: Thu Apr 04, 2013 6:18 pm    Post subject: Data conversion from EBCDIC not happening Reply with quote

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
View user's profile Send private message
fjb_saper
PostPosted: Thu Apr 04, 2013 8:41 pm    Post subject: Reply with quote

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
View user's profile Send private message Send e-mail
AmitN
PostPosted: Wed Apr 10, 2013 8:53 am    Post subject: Reply with quote

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
View user's profile Send private message
zpat
PostPosted: Wed Apr 10, 2013 9:14 am    Post subject: Reply with quote

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
View user's profile Send private message
AmitN
PostPosted: Wed Apr 10, 2013 9:32 am    Post subject: Reply with quote

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
View user's profile Send private message
zpat
PostPosted: Wed Apr 10, 2013 11:46 am    Post subject: Reply with quote

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
View user's profile Send private message
rekarm01
PostPosted: Wed Apr 10, 2013 12:17 pm    Post subject: Re: Data conversion from EBCDIC not happening Reply with quote

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
View user's profile Send private message
AmitN
PostPosted: Mon Apr 15, 2013 2:40 am    Post subject: Reply with quote

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
View user's profile Send private message
rekarm01
PostPosted: Mon Apr 15, 2013 3:54 am    Post subject: Reply with quote

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
View user's profile Send private message
AmitN
PostPosted: Wed Apr 17, 2013 8:51 am    Post subject: Reply with quote

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
View user's profile Send private message
Vitor
PostPosted: Wed Apr 17, 2013 8:57 am    Post subject: Reply with quote

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
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 » Data conversion from EBCDIC not happening
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.