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
 

 

Unicode conversion from Little Endian to Big Endian.

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> COBOL Programming
View previous topic :: :: View next topic  
Author Message
giridhar_vinta

New User


Joined: 09 Apr 2007
Posts: 2
Location: India

PostPosted: Mon Apr 09, 2007 9:18 pm    Post subject: Unicode conversion from Little Endian to Big Endian.
Reply with quote

Hi there,
I am trying to process a Unicode data file received from windows. Found out that the file received is of Unicode LE (Little Endian) form, and before processing it has to be converted into BE (Big Endian) form.

My task is now to convert this file to Big Endian form so that I can use my COBOL code to complete the process.
In the net I got the formulae for conversion, but, it is provided in C code.
long wc;
wc = (wc >> 8) | ((wc % 256) << 8);
I am trying to code this in COBOL on Z/OS platform.
Can any one suggest how this can be achieved using COBOL.

Thanks
Back to top
View user's profile Send private message

dick scherrer

Site Director


Joined: 23 Nov 2006
Posts: 19270
Location: Inside the Matrix

PostPosted: Tue Apr 10, 2007 1:15 am    Post subject:
Reply with quote

Hello,

If you can, convert the file(s) on the win-based system and re-transmit.

If you can't, find or create the conversion chart, set up a couple of arrays for "little" and "big", and convert pair by pair.
Back to top
View user's profile Send private message
giridhar_vinta

New User


Joined: 09 Apr 2007
Posts: 2
Location: India

PostPosted: Tue Apr 10, 2007 2:13 pm    Post subject: Re: Unicode conversion from Little Endian to Big Endian.
Reply with quote

Hi,

Can you provide little more details like where I can get these conversion byte info. for the Little Endian to big endian? I did try the Unicode site, they must be there, I couldn't get it.

For my testing I did do the conversion to big-endian in windows and going ahead with it. But for production that wouldn't work, as the file transmitted to my process is again re-transmitted to another system for processing, I cannot change the file contents in any way.

Any suggestions?

Thanks,
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 -> COBOL Programming All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts File Aid to File Manager conversion murali3955 IBM Tools 4 Thu Nov 24, 2016 3:41 pm
No new posts Conversion of a VB file to FB. isssal DFSORT/ICETOOL 1 Mon Oct 31, 2016 10:23 pm
No new posts EBCDIC to ASCII conversion using OCOPY mistah kurtz All Other Mainframe Topics 5 Tue Sep 06, 2016 2:26 pm
No new posts Converting EBCDIC to Unicode (TimeStamp) muralikrishnan_new COBOL Programming 2 Mon Jul 25, 2016 10:42 pm
No new posts Comparex utility to Syncsort conversion mistah kurtz SYNCSORT 11 Fri Jul 22, 2016 1:53 pm


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