Precision problem
Posted in 1995
Topics: Installation, Setup & Upgrades, Connectivity: ESQL/C, 4GL & Embedded SQL, Migration, Import/Export & Data Conversion
I've been on the job for less than three months. I had been away at a class and came back last week to find out that one of our processes is costing us a serious loss of precision in a couple of our tables. Fresh data is moved from the working to an archived version of the same table every night. It is done using a report writer in 4GL which deletes rows as it goes through them and writes a report which essential does a manual unload. That is to say that it takes every field of the table, in order, and writes it followed by a "|" into a text file. It seems, however, that it's giving me only two decimal places when it does this. Many of the fields in this table have values with as many as twelve decimal places. Obviously, this problem must be solved immediately. One person who's been there a while insists that this problem only began about a month ago. I don't think this is so because I've looked at some old files which suggest it's been going on for a year or more. I spoke with Informix technical support on Friday and was told to set the environmental variable DBFLTMASK to -1. I did this. Oddly, I cannot find any reference to this variable in my Informix manuals. Once this variable was set, a query in Query-Language gave me actually values for my data, but the report-writer still gave me only two decimal places. I can sort of get around the problem with a "using" statement, but that gives me pseudo-precision on values which do not actually have twelve significant decimal places. One more piece of information: the fields in question are of data-type float. I've tried passing them through variables of types character and decimal in the report and that doesn't work either. During my latest conversations with Informix, I was told that we have a mismatch between the version we're running and our system and that the only thing we can do to solve this problem is upgrade. Can't do that right now. It's an industrial database which runs whenever the plant is running. I can't upgrade until the entire plant shuts down for the weekend. Does anybody out there have any ideas? Thanks in advance, Bonnie J. Black