Results 1 to 1 of 1
I realize this is a linux forum but any guidance to shed light on this issue would be very helpful.
I have a binary file consisting of and EBCIDIC part ...
- 07-29-2011 #1Just Joined!
- Join Date
- May 2006
- Posts
- 13
32 bit IBM binary file, linux versus windows
I realize this is a linux forum but any guidance to shed light on this issue would be very helpful.
I have a binary file consisting of and EBCIDIC part from byte 0-3200 followed by a binary part from byte 3201-3600 and then numeric data in the form of 32bit IBM floating point real.
I have cpp code on my linux box that reads these data no problem. The data is read as binary into a char array and then cast to a float which is then used to convert from IBM to IEEE, all good.
I am trying to replicate these steps on a windoz box with the same file. I am able to read the EBCIDIC and binary parts ok but when it comes to the data IBM part I am struggling. I have tried all sorts of things including byte swapping (little versus big endian). When I compare the hex values using octal dump on my linux box to the same byte location in the data portion on the windoz box they appear to be different (does not look like big versus little endian byte swapping issue).
There is nothing wrong with the file as I am able to read it with another application on windoz with no problem, I am trying to roll my own.
These are both intel based machines and would expect the files to look identical in hex but I am obviously missing something. Any suggestions would be helpful.
Thanks,
Pete.


Reply With Quote