Author |
Message
|
podowd |
Posted: Thu Dec 15, 2005 3:22 pm Post subject: RFH2 and CCSID |
|
|
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 |
|
 |
fjb_saper |
Posted: Thu Dec 15, 2005 8:33 pm Post subject: |
|
|
 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 |
|
 |
podowd |
Posted: Fri Dec 16, 2005 12:38 pm Post subject: |
|
|
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 |
|
 |
EddieA |
Posted: Fri Dec 16, 2005 5:15 pm Post subject: |
|
|
 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 |
|
 |
fjb_saper |
Posted: Fri Dec 16, 2005 6:12 pm Post subject: |
|
|
 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 |
|
 |
podowd |
Posted: Sun Dec 18, 2005 8:00 pm Post subject: |
|
|
Novice
Joined: 23 Sep 2004 Posts: 19
|
Thanks Eddie - That worked a treat.
 |
|
Back to top |
|
 |
|