I am working on a conversion project, which involves reading out a whole lot of good old VSAM files , which contain valuable data.
The original programming language, used to store these data, is PL/I. Some of the fields have been defined as FLOAT(6).
As such that is no problem, as I just dump the data via PUT SKIP EDIT statements onto flat files, that then get converted to txt files for our PC wiz kids to do their evil stuff with.
I do however want to make sure that the wiz kids get the right data. I can display the data in the files in hex, which is fine for reading and checking binary or dec fields. For Float however it isn't as straight forward.
For example, I have a field which is defined FLOAT(6) and has the hexadecimal value :
I believe this to be the representation of 1.00000
Some convertor, that I found on the net, however tries to tell me that it represents the value 9.00000, which got me confused.
Does any one have any experience with this and how did you handle it?
Joined: 06 Jun 2008 Posts: 8280 Location: Dubuque, Iowa, USA
It has been a while, but floating point numbers are expressed in terms of a sign bit, biased exponent for 7 bits (hex 40 is the normal bias, so 41 means the number is times 10), and the remaining bits represent the value. I've confirmed via SAS that 41100000 is 1.E0 floating point.