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.
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.
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.