Re: Data type problem
Posted in 1997
>From: "Kemlo" <abm62@dial.pipex.com>
>Date: 26 Aug 1997 21:10:33 GMT
>X-Informix-List-Id: <news.42144>
>
>I am trying to export data from a lagacy application written with Informix
>Ver 1.1 (1993). I am using the report writer to create ASCII files and I
>am having a problem reading numeric fields of type float. They are
>appearing as 1.2555447787e43 etc when they should be in the region of
>1000-10000. The system was on a desktop IBM box running AIX. I am working
>on a SCO Operserver PC.
The basic problem is that FLOAT and SMALLFLOAT values are stored in the
hardware's native formats, and these are inherently non-portable between
different types of CPU. For example, the Motorola M680x0 format is very
different from the Intel 80x86 formats.
1. Do you still have the AIX system available to you?
-- If so, do the unloading on that machine.
-- Or, alter all the FLOAT columns to DECIMAL(16) and all the
SMALLFLOAT columns to DECIMAL(8) and then move the database
to the new PC.
2. If not, do you have any AIX machine available to you, anywhere, anyhow?
-- If so, there is an outside chance that the old software will still
work on the new machine. Install it and try one or the other of the
processes listed under option 1.
3. If you have no AIX machines available, then you are probably left with
reverse engineering the AIX floating point numbers on the PC. Good
luck!
>I understand that there is a utility called "unload" which will export the
>database in ASCII . My 4GL RDS package does not have this. Does anyone
>know where I could get this utility.
There's nothing called 'unload' as a program. There is an UNLOAD statement
which can be embedded in an I4GL program:
UNLOAD TO "tablename.unl" SELECT * FROM TableName
Repeat ad nauseam for each table in the database. If you still have the AIX
system, you can use this to do the unloading. Given that you're working with
a 1.1 I4GL, you probably do not have dbexport available, which does this job
automatically.
Yours,
Jonathan Leffler (johnl@informix.com) #include <disclaimer.h>
PS: Warning I do not reply to messages with anti-spam in the return path.
PPS: Version 1.1 I4GL was out of date in 1993 (by more than 3 years).