double datatype weirdness
Posted: Mon Nov 23, 2015 4:50 pm
Something weird is happening and i can't tell why.
I send in two values in a comma separated sequential file -
9999999999, 111 (that is ten 9s)
All columns and the stage variable in the job are defined as double 20,5.
In the transformer i set a stage variable V = max(val1, val2)
Then i output the stage variable to another sequential file. Data type through out the job is double 20,5.
Now,
In LINUX, i get the following output in the file -
1.11000000000000000E+02
So basically Linux datastage thinks that between 9999999999 and 111, 111 is the max.
In AIX i get the following output -
2.14748364700000000E+09
Which is neither 111 nor 9999999999.
So any idea what is going on ?
Please note that if i use just nine 9s instead of ten ...it works okay giving me 9.99999999000000000E+08
Which means when i use a value that has ten 9s, some kind of overflow is occurring turning the value into a negative number perhaps ??
I send in two values in a comma separated sequential file -
9999999999, 111 (that is ten 9s)
All columns and the stage variable in the job are defined as double 20,5.
In the transformer i set a stage variable V = max(val1, val2)
Then i output the stage variable to another sequential file. Data type through out the job is double 20,5.
Now,
In LINUX, i get the following output in the file -
1.11000000000000000E+02
So basically Linux datastage thinks that between 9999999999 and 111, 111 is the max.
In AIX i get the following output -
2.14748364700000000E+09
Which is neither 111 nor 9999999999.
So any idea what is going on ?
Please note that if i use just nine 9s instead of ten ...it works okay giving me 9.99999999000000000E+08
Which means when i use a value that has ten 9s, some kind of overflow is occurring turning the value into a negative number perhaps ??