We've just discovered the following, and think it's a wee bit of a
dumb idea. Does anybody agree?
------
Informix have reported that in future run time errors:-
-1226, -1213, -1214, -1202 will NO LONGER be reported at run time.
-1226 Decimal or money value exceeds maximum precision.
-1213 A character to numeric conversion process failed.
-1214 Value too large to fit in a SMALLINT.
-1202 An attempt was made to divide by zero.
Their reason is what they call a NIS (Not in spec) feature. The feature has
been available but has now been withdrawn.
A workaround (as mentioned by Informix) is to compile the programs with
the -anyerr parameter, and to some extent this works, *except* for things
involved with SELECT statements.
The following wee program illustrates that it's now perfectly reasonable
to select CHAR columns into SMALLINT fields without an error:
main
define i smallint
-- Point at a database (You'll want to change this line)
database stores6
-- Program should die if we have an error
whenever any error stop
-- Clear out, and startup, the errorlog
run "rm -f dumb.log"
CALL startlog("dumb.log")
-- Select a char column into a smallint
select tabname into i from systables where tabname = "systables"
-- Look ma -- no problems!
display "nothing wrong, status = ", status
-- But check out the errorlog...
display "but what's this?"
run "cat dumb.log"
end main
The above *might* be a bug, or it might be expected behaviour.
Waddaya reckon? (This with 6.02.UC1 RDS)
Regards,
Kerry S
------------------------------------,------------------------------------------
Kerry Sainsbury, kerry@kcbbs.gen.nz | THE INFORMIX FAQ v2.4 Oct 95
Quanta Systems, Auckland | http://www.iiug.org/techinfo/faq/
New Zealand. Work: +64 9 377-4473 | ftp://ftp.iiug.org/pub/informix/faq
Home: +64 9 279-3571 | ftp://kcbbs.gen.nz:/pub/informix/