IBM Mainframe Forum Index
 
Log In
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Register
 

How to format a UTF8 records?


IBM Mainframe Forums -> DFSORT/ICETOOL
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
Rajesh S
Warnings : 1

New User


Joined: 11 Jul 2007
Posts: 54
Location: Chennai

PostPosted: Wed Dec 31, 2014 5:19 pm
Reply with quote

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
View user's profile Send private message
Robert Sample

Global Moderator


Joined: 06 Jun 2008
Posts: 8569
Location: Dubuque, Iowa, USA

PostPosted: Wed Dec 31, 2014 9:24 pm
Reply with quote

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
View user's profile Send private message
Rajesh S
Warnings : 1

New User


Joined: 11 Jul 2007
Posts: 54
Location: Chennai

PostPosted: Fri Jan 02, 2015 10:12 am
Reply with quote

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
View user's profile Send private message
Bill Woodger

Moderator Emeritus


Joined: 09 Mar 2011
Posts: 7311
Location: Inside the Matrix

PostPosted: Fri Jan 02, 2015 4:16 pm
Reply with quote

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
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic View Bookmarks
All times are GMT + 6 Hours
Forum Index -> DFSORT/ICETOOL

 


Similar Topics
Topic Forum Replies
No new posts Writng matched records into output fi... DFSORT/ICETOOL 9
No new posts Converting a file from PD to display ... SYNCSORT 4
No new posts Merging more than two records DFSORT/ICETOOL 15
No new posts Matching and non matching records usi... DFSORT/ICETOOL 11
No new posts REMOVE DUPLICATE RECORDS BASED ON A S... DFSORT/ICETOOL 4
Search our Forums:

Back to Top