Ok.. Im trying to convert an old (very old) C-ISAM file (from a SCO Unix box) into plain text (a must for the first step which is checking the data and manipulating it first) for integrating it into a newer SQL system.
I can parse the file absolutely fine in terms of fields and there are only 9 fields per record, however the value (currency) fields are driving me up the wall. So far ive been unable to even come close to converting them to a normal readable float/double.
Below I have placed some examples of the values in the fields as encoded in the file and what they should read when converted. The float/double fields consist of 8 bytes, am i interpreting it wrong to take them all as one value? is the field split in two?, if so can someone enlighten me please.
0x0000000000A07940 - 410
0x0000000000608D40 - 940
0x00000000204ED440 - 20792.5
0xAE47E17A14B66240 - 149.99
Any help/code will be greatly appreciated as this is slowly driving me round the twist, it doesn't help that its not often I have to deal directly with binary values so for once im just a little blind on this one.
Thanx in advance
I can parse the file absolutely fine in terms of fields and there are only 9 fields per record, however the value (currency) fields are driving me up the wall. So far ive been unable to even come close to converting them to a normal readable float/double.
Below I have placed some examples of the values in the fields as encoded in the file and what they should read when converted. The float/double fields consist of 8 bytes, am i interpreting it wrong to take them all as one value? is the field split in two?, if so can someone enlighten me please.
0x0000000000A07940 - 410
0x0000000000608D40 - 940
0x00000000204ED440 - 20792.5
0xAE47E17A14B66240 - 149.99
Any help/code will be greatly appreciated as this is slowly driving me round the twist, it doesn't help that its not often I have to deal directly with binary values so for once im just a little blind on this one.
Thanx in advance