Portal | Manuals | References | Downloads | Info | Programs | JCLs | Master the Mainframes
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Usergroups Profile Log in to check your private messages Log in
 

 

How to format a UTF8 records?

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> DFSORT/ICETOOL
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    Post subject: How to format a UTF8 records?
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: 7904
Location: Bellevue, IA

PostPosted: Wed Dec 31, 2014 9:24 pm    Post subject: Reply to: How to format a UTF8 records?
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    Post subject: Reply to: How to format a UTF8 records?
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

DFSORT Moderator


Joined: 09 Mar 2011
Posts: 7223

PostPosted: Fri Jan 02, 2015 4:16 pm    Post subject: Reply to: How to format a UTF8 records?
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    IBMMAINFRAMES.com Support Forums -> DFSORT/ICETOOL All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts Limit duplicate records in the SORT pshongal SYNCSORT 6 Mon Nov 21, 2016 12:54 pm
No new posts Match or compare two files in VB Format anatol DFSORT/ICETOOL 14 Thu Nov 03, 2016 7:41 pm
No new posts How to split the records using the am... vnktrrd DFSORT/ICETOOL 24 Fri Oct 28, 2016 7:33 pm
No new posts Low values Results from VARCHAR FORMAT balaji81_k DB2 10 Thu Oct 20, 2016 1:18 am
No new posts Sort records based on numeric field. Alks SYNCSORT 2 Wed Oct 19, 2016 10:14 pm


Facebook
Back to Top
 
Mainframe Wiki | Forum Rules | Bookmarks | Subscriptions | FAQ | Tutorials | Contact Us