Conversion of big endian data from Unix to little endian data
Currently we have migrated data from Unix linux. The data in Unix is in Big endian byte structure. Where are as Linux (suse linux) byte structure us little endian. This byte order mismatch is creating problem when data is read again in microfocus cobol.
Is there any way to set byte order in Linux is big endian? Is there any utility to convert data in big endian byte structure to little endian byte order. |
dd conv=swab if=<inputfile> of=<outputfile>
|
dd conv=swab if=<inputfile> of=<outputfile>
When we use dd conv=swab if=<inputfile> of=<outputfile> it is swapping only 2 bytes. We need swapp 8 bytes at times. We used cbs=8 in option, we also tried with ibs & obs option but complete data isn't swapped.
Am I missing some option. Please help. |
I think I read you need a much more complex way to first test the data then change it according to some features of the data. I have seen some python scrips and java scripts to do that. As I recall there are some caveats to the data based on type and size that needs to be checked.
I could be wrong too. One site I think I read you can transfer via some network for example and the host and client should then work on the data correctly on each end to match the processor type. |
Quote:
Quote:
Quote:
|
All times are GMT -5. The time now is 11:57 AM. |