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 » RFH2 and CCSID

Post new topic  Reply to topic
 RFH2 and CCSID « View previous topic :: View next topic » 
Author Message
podowd
PostPosted: Thu Dec 15, 2005 3:22 pm    Post subject: RFH2 and CCSID Reply with quote

Novice

Joined: 23 Sep 2004
Posts: 19

Hi,
I use the readLine() method to process the data that follows the MQRFH2 folders in a java routine.

I notice readLine() uses the ccsid on the MQMD rather than the ccsid in the RFH2 header (not the NameValueData ccsid) when converting the data to Unicode.

Is there any way to tell WMQ to use the ccsid specified in the RFH2 header rather than the ccsid on the MQMD?

My logic looks something like this at the moment:

if (mqmd ccsid is the same as RFH2 ccsid)
use readLine
else if (RFH2 ccsid is 1208) //must cater for UTF-8 data (WMQ ccsid 1208)
use readByte to load a byte[]
use new String(byte[], "UTF-8")
else ?

Any suggestions on how this can be improved/simplified much appreciated.

Thanks,
Pat
Back to top
View user's profile Send private message Send e-mail
fjb_saper
PostPosted: Thu Dec 15, 2005 8:33 pm    Post subject: Reply with quote

Grand High Poobah

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

Are you using base Java or JMS ?

Dealing with RFH headers, using JMS makes life so much easier.

Try it, enjoy it
Back to top
View user's profile Send private message Send e-mail
podowd
PostPosted: Fri Dec 16, 2005 12:38 pm    Post subject: Reply with quote

Novice

Joined: 23 Sep 2004
Posts: 19

Thanks

I am using base java.
(I dont have the option to use jms at this point, hope to do that in a later release.)
Back to top
View user's profile Send private message Send e-mail
EddieA
PostPosted: Fri Dec 16, 2005 5:15 pm    Post subject: Reply with quote

Jedi

Joined: 28 Jun 2001
Posts: 2453
Location: Los Angeles

When your code "skips" past the RFH2, use the Encoding and CCSID in the RFH2 to set the values in the message object.

Cheers,
_________________
Eddie Atherton
IBM Certified Solution Developer - WebSphere Message Broker V6.1
IBM Certified Solution Developer - WebSphere Message Broker V7.0
Back to top
View user's profile Send private message
fjb_saper
PostPosted: Fri Dec 16, 2005 6:12 pm    Post subject: Reply with quote

Grand High Poobah

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

podowd wrote:
Thanks

I am using base java.
(I dont have the option to use jms at this point, hope to do that in a later release.)


Can you elaborate on that ?
Back to top
View user's profile Send private message Send e-mail
podowd
PostPosted: Sun Dec 18, 2005 8:00 pm    Post subject: Reply with quote

Novice

Joined: 23 Sep 2004
Posts: 19

Thanks Eddie - That worked a treat.
Back to top
View user's profile Send private message Send e-mail
Display posts from previous:   
Post new topic  Reply to topic Page 1 of 1

MQSeries.net Forum Index » IBM MQ Java / JMS » RFH2 and CCSID
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.