As it turns out, there's confusion on our end. I was given this error and was told it just started happening. However, I believe this error to be unrelated with the issue that just started recently. So it does look, as people are stating, that we may have been attempting to insert/update bad data into our files all along. (Sidenote, the files were created with DDS.)
A co-worker of mine did find a thread online about updating the JDBC driver to help deal with some of these data issues, so we're giving that a shot as well. And we'll be scouring our data to try and resolve the issue at the heart of the matter as Buck did.
Thanks you much for the responses,
Kurt
-----Original Message-----
From: midrange-l-bounces@xxxxxxxxxxxx [mailto:midrange-l-bounces@xxxxxxxxxxxx] On Behalf Of Buck
Sent: Wednesday, September 30, 2009 10:31 AM
To: midrange-l@xxxxxxxxxxxx
Subject: Re: Error SQL0302 *N
Kurt Anderson wrote:
[CPD4374] Field HVR0004 and value 4 not compatible. Reason 7.
[7 -- Value contains numeric data that is not valid.]
[SQL0302] Conversion error on host variable or parameter *N.
From what I've been told, this has been happening for the past week or so. We're not aware of any changes on the i or in any SQL code on the front-end. It seems that there is no single SQL statement that causes this issue, as the error will suddenly appear when performing an SQL statement (but not always). The SQL commands are issued through a JDBC connection.
I had a similar issue on V5R4 and suspect it was a cume that I applied.
In my case, there really is bad data in the file - it's a S36 style
program writing blanks to a packed numeric field. Sometimes. The
'solution' has been that everybody compiles with IGNDECERR / FIXNBR.
That works (shudder) for RPG but not so well for SQL.
In the end I could not find a way to tell SQL to keep going and report
an informational error. I wrote a cleanup program that runs every day
to physically re-format the invalid packed data. That will continue to
run until we find and fix every program that pours bad data into every file.
--buck
As an Amazon Associate we earn from qualifying purchases.