View previous topic :: View next topic
|
Author |
Message |
giridhar_vinta
New User
Joined: 09 Apr 2007 Posts: 2 Location: India
|
|
|
|
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 |
|
|
dick scherrer
Moderator Emeritus
Joined: 23 Nov 2006 Posts: 19244 Location: Inside the Matrix
|
|
|
|
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 |
|
|
giridhar_vinta
New User
Joined: 09 Apr 2007 Posts: 2 Location: India
|
|
|
|
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 |
|
|
|