|
RSS Feed - WebSphere MQ Support
|
RSS Feed - Message Broker Support
|
 |
|
Conversion from CCSID 1155 |
« View previous topic :: View next topic » |
Author |
Message
|
inforddr |
Posted: Thu May 30, 2019 8:05 am Post subject: Conversion from CCSID 1155 |
|
|
Newbie
Joined: 30 May 2019 Posts: 2
|
Hi,
We have just created a Turkish environment on an IBM iSeries where all the data files have a CCSID of 1155 (Turkish + Euro). Data is being retrieved from these files by a job, again configured with a CCSID of 1155, and an MQ message is created with a Character set identifier of 1155 and written to a remote MQ Queue for transmission to a Windows Server.
The MQ Queue Manager on the IBM iSeries box (MQ version = V8R0M0) has a CCSID of 37 and the Queue Manager on the Windows Server (MQ version = 8.0.0.5) has a CCSID of 857 (Turkish).
There is a java process on the Windows Server that reads the MQ message from the iSeries, but this read fails with an exception as follows: "java.nio.charset.UnsupportedCharsetException: 1155
at com.ibm.mq.MQMessage.getCodepage(MQMessage.java:3057)
at com.ibm.mq.MQMessage.readConvertedString(MQMessage.java:3003)
at com.ibm.mq.MQMessage.readStringOfCharLength(MQMessage.java:1237)
at com.ibm.mq.MQMessage.readString(MQMessage.java:1784)
at com.geac.erp.system21.aif.toolkit.SourceFromMQ.getTextFromMessage(SourceFromMQ.java:558)".
N.B. Using RFHUTIL to view the Message Descriptor of the MQ Message on the Windows Server confirms that the Code Page is set to 1155.
From investigating this on the web it appears that, for MQ 8 on Windows, conversion to/from Unicode CCSIDs is not supported for CCSID of 1155. Is that correct and if so can anyone please suggest a workaround.
Thanks |
|
Back to top |
|
 |
hughson |
Posted: Thu May 30, 2019 12:11 pm Post subject: |
|
|
 Padawan
Joined: 09 May 2013 Posts: 1959 Location: Bay of Plenty, New Zealand
|
If CCSID 1155 is Turkish + Euro there will be another code page that is identical except for the Euro symbol. Are you in need of the Euro symbol?
If not, you could map 1155 to that one, or just use that one in your messages.
Cheers,
Morag _________________ Morag Hughson @MoragHughson
IBM MQ Technical Education Specialist
Get your IBM MQ training here!
MQGem Software |
|
Back to top |
|
 |
rekarm01 |
Posted: Thu May 30, 2019 6:20 pm Post subject: Re: Conversion from CCSID 1155 |
|
|
Grand Master
Joined: 25 Jun 2008 Posts: 1415
|
inforddr wrote: |
There is a java process on the Windows Server that reads the MQ message from the iSeries, but this read fails with an exception as follows:
Code: |
java.nio.charset.UnsupportedCharsetException: 1155
...
at com.ibm.mq.MQMessage.readString(MQMessage.java:1784)
... |
|
With IBM MQ Classes for Java, applications can use the underlying MQ API to convert on get, by calling MQQueue.get(message, gmo) with the MQGMO_CONVERT option; this method supports converting about 160 CCSIDs to/from Unicode, on Windows.
Or applications can use the Java application layer to convert on read, by calling one of the MQMessage.readString() methods; this only supports converting a few CCSIDs to/from Unicode: 37 (EBCDIC), 819 (ISO 8), and 850 (IBM-PC Data).
inforddr wrote: |
If CCSID 1155 is Turkish + Euro there will be another code page that is identical except for the Euro symbol. Are you in need of the Euro symbol? |
The related CCSID without the Euro is 1026, (which also happens to be the native CCSID for Turkish on IBM i). |
|
Back to top |
|
 |
inforddr |
Posted: Fri May 31, 2019 1:40 am Post subject: |
|
|
Newbie
Joined: 30 May 2019 Posts: 2
|
Yes, we do need the Euro symbol hence the attempt to use CCSID 1155.
If the message is written using CCSID 1026, it works, but we loose the Euro symbol.
The java is currenlty using MQQueue.get(message, gmo) to read the message from the queue. It is not however setting the MQGMO_CONVERT option explicitly. It then does also use MQMessage.readString() method calls depending on message Character set.
Checking the "160 CCSIDs" link that you provided, shows a page that I have visited before which shows that CCSID 1155 is not in the table of supported CCSIDs for conversion on Windows.
So looks like conversion directy from 1155 is not supported and we will most likely need to use CCSID 1026 and code round the Euro issue.
Thanks for your help. |
|
Back to top |
|
 |
rekarm01 |
Posted: Fri May 31, 2019 4:09 pm Post subject: Re: Conversion from CCSID 1155 |
|
|
Grand Master
Joined: 25 Jun 2008 Posts: 1415
|
inforddr wrote: |
If the message is written using CCSID 1026, it works, but we [lose] the Euro symbol. |
Is that so? CCSID 1026 works with readString(), even though it's not documented as a supported CCSID for readString()?
inforddr wrote: |
The java ... is not however setting the MQGMO_CONVERT option explicitly. |
Then try setting the MQGMO_CONVERT option, (and the target CCSID), explicitly, and see what happens. With any luck, CCSID 1155 will work with MQGMO_CONVERT, (even though it's not documented).
inforddr wrote: |
Checking the "160 CCSIDs" link that you provided, shows a page that I have visited before ... |
One important point here is that this page is only relevant for converting with MQGMO_CONVERT, not for converting with readString().
inforddr wrote: |
So looks like conversion directy from 1155 is not supported ... |
There are still a few more options to explore, such as installing a conversion table, or something similar, to add support for the CCSID. Consult the documentation, or IBM, for details about how to do that on Windows.
Or, enabling channel conversion between the iSeries and Windows to convert message data from CCSID 1155 to CCSID 857, which the Java app can then convert to Unicode. That would preserve the Euro, but could risk losing some other characters.
Or, using something outside of MQ to convert the message, such as java.nio.charset.Charset, (or the IBM integration Bus), either before writing the message data, or after reading it. |
|
Back to top |
|
 |
|
|
 |
|
Page 1 of 1 |
|
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
|
|
|
|