Discussion:
DB2 UDB 400 Database Trigger and "Decimal Data Error"
(too old to reply)
mike
2004-05-12 14:53:07 UTC
Permalink
All,

I have written several SQL database triggers on tables in an (very)
old application. Please keep in mind that these are not the type of
triggers that RPG / COBOL programmers typically write. These are
considered internal and are written in SQL (however after some
research I find that these ultimately become external C programs).
Some are update / after triggers while the others are insert / after
triggers. Both types of triggers update an audit table.

The problem I am having is that while everything tested out fine in
our development environment, when moved to the production environment
an error occurs to the end-user "Fatal ErrorÂ…." And the job log has
the following:

Decimal data error.
Application error. MCH1202 unmonitored by TI_CSRMSTR at statement
0000000298, instruction X'0000'.

Error occurred in trigger program.
Error occurred in trigger program.

The end-users recover from this error (by hitting f12 I think) and my
audit table is updated like nothing has happened. I am confident that
this is not a SQL trigger problem but one of data conversion and has
not surfaced until now. We are running V5R1.

Does anyone have any suggestions on how to fix this?

Thanks,

Mike
Kent Milligan
2004-05-17 23:43:42 UTC
Permalink
Sounds like there is some dirty decimal data in your production files that needs
to be cleaned up.
--
Kent Milligan, DB2 & BI team
PartnerWorld for Developers, iSeries
www.iseries.ibm.com/db2
(opinions stated are not necessarily those of my employer)
Newbie_Neil
2004-05-18 06:19:58 UTC
Permalink
Hi there

Yes, your production data probably contains some fields that were
never initialised.

You can set the RPG compiler to *IGNORE DECIMAL DATA ERRORS, can you
do the same in SQL?

Also, if you use Query on the tables with the problems it will
identify which fields are giving you a problem. You could then go into
the production software and correct the problem. (Might be a huge
task)

Cheers
Neil

Loading...