View previous topic :: View next topic
|
Author |
Message |
Rajesh S Warnings : 1 New User
Joined: 11 Jul 2007 Posts: 54 Location: Chennai
|
|
|
|
Hi All,
I have set of UTF8 records which contains foreign characters. Due to foreign character (each contains 3 bytes) next fields got messed up. All the space value of X’40’ is replaced as X’20’ in UTF8 records feed.
Input record:
Code: |
Field-1 Field-2 Field-3 Field-4
<Num> <English> <foreign> <num>
Columns 1-10 11-20 21-40 41-50
1234 XZAE ... 256
1235 XRTD ....... 256
1236 XARE ......... 256 |
Output record:
Code: |
Field-1 Field-2 Field-3 Field-4
<Num> <English> <foreign> <num>
Columns 1-10 11-20 21-40 41-50
1234 XZAE … 2546
1235 XRTD … 2586
1236 XARE … 2066 |
Code'd |
|
Back to top |
|
|
Robert Sample
Global Moderator
Joined: 06 Jun 2008 Posts: 8696 Location: Dubuque, Iowa, USA
|
|
|
|
Your post is one of the most confusing I've read in a LONG time. For example, you reference X'40' as a space -- but that is EBCDIC, not UTF-8; UTF-8 uses X'20' for the space character. Furthermore, a pure UTF-8 implementation supports variable length characters up to 4 bytes long so why you are having problems with 3-byte characters is not clear. Is the data in EBCDIC and you are trying to convert it to UTF-8? Is the data in UTF-8 on another platform and you want to move it to the mainframe and convert it to EBCDIC? Your post is not very explanatory.
I think you need to go back to square one and explain your issue and the problem again, in more detail. |
|
Back to top |
|
|
Rajesh S Warnings : 1 New User
Joined: 11 Jul 2007 Posts: 54 Location: Chennai
|
|
|
|
Hi Robert,
Thanks for the reply.
I am receiving the file in binary format which contains EBCDIC (english) and UTF8 data(foreign language in single field).
When i gave tso command DISPLAY UTF8. I can able to read the english fields and UTF8 field is not in readable format but the actual data has been preserved in hexadecimal format.
Now am trying to allign the fields after the UTF8 field which are collapsed due to 3 byte character. when am trying give (JFY=(SHIFT=LEFT) to allign the records in proper format it will not work, so, I am converting all the X'02' to X'40' to apply the command (JFY) to format. Please let me knw if there is any simplest way to format these records?
Thanks,
Rajesh S. |
|
Back to top |
|
|
Bill Woodger
Moderator Emeritus
Joined: 09 Mar 2011 Posts: 7309 Location: Inside the Matrix
|
|
|
|
I'm not sure what you are trying to do. If multiple bytes in the input data get you a single byte in the "displayable" data, then you will have no problems lining things up. If you change anything, you will trash your data.
So, what are you trying to do, including why you are trying to do it? |
|
Back to top |
|
|
|