Re: WARNING:Latest 4GL+Online buggy
Posted in 1999
In article <7uhjth$jrm$1@news.xmission.com>, Obnoxio The Clown
<obnoxio@hotmail.com> writes
>
>From: Richard Spitz <Richard.Spitz@ana.med.uni-muenchen.de>
>It could be a problem with the length of the string. If you know that the
>string will never be longer than 20 chars so you define it as a CHAR(20),
>and suddenly it's 23 chars and this happens before the prepare completes,
>you might get a syntax error. But I'm just guessing. :-)
>
DEFINE p_site_no INTEGER
DEFINE my_str CHAR(20)
DEFINE my_flag char(1)
SELECT apply_discount
INTO my-flag
from config_table
where config_param = "APPLY DISCOUNTS"
# Asuume my_flag Set to "Y" for this site
LET my_str = "select a,b,c from t1"
^^^^^^^^^^^^^^^^^^
1 2
12345678901234567890 characters
PREPARE x FROM my_str
IF my_flag = "Y" THEN
apply monetary discount to the job
END IF
AFTER THE prepare
my_str = "select a , b , c , d from t1"
1 2
123456789012345678901234567 characters
^
memory space for my_flag now " "
Hence suddenly after the prepare my_flag becomes " " and the discounts
are not applied. Hence the costs sent to the account system are wrong
and the client invoices customers wrong or calculates their internal
costs wrong and management reporting figures are wrong. (This could
put the customer out of business!).
If you replace my_flag with integer or decimals then other weird
behaviour happens. With decimals then the decimal values changes
(Could be a cost for an item of stock which then gets sent to an
accounting system) hence the accounts become wrong!!
We do not have the resources to run a full system test of our code at
this late time when we are busy upgrading other customers the y2k
compliant version of the system. This is because the problem is hard
to spot since no errors may be produced and the program will not
necessarily crash, just produce wrong results.
How the code is affected also depends upon the memory size of the
variables and memory layout of variables on the 4gl runtime stack
which is platform specific. We support customers on over 10 platforms
many of which we do not have in-house and hence we cannot test on
until we release to the customers test system..
This puts us in trouble since we can not longer order 4gl upgrades.
(I could not install a 4gl upgrade onto a customer demo system tonight
since we ordered the latest version and 7.30.UC1 arrived.).
The original customer has a DECENTURY problem, we have interfaces
to other systems which load 2 digit dates into tables from load
files. These are become 1900/1901 which affect the customers live
data. The interfaces cannot be changed since we would have to agree
it with the company who supply the load files and they will not
change things with no notice.
We were advised to move to 7.30.UC1 by Informix UK since this will
fix our problem.
>______________________________________________________
>Get Your Private, Free Email at http://www.hotmail.com
--
David Williams