Just some old experience on the subject:
Non-numeic data may well be contained in a numeric field. In the old days with S36, the op.system did not care whether a numeric field contained a zero or a blank – both worked as a zero. Native OS400 does not have this ‘flexibility’ except for the ‘System/36 environment’.
If your files contain data that has been migrated from System/36 and even converted to externally DDS-described files, then your file may well contain non-numerics in numeric fields.
An easy way to avoid (repair!) the SQL-problem, is to use Query/400 as your repair-tool:
The method copies your file/data to a workfile and you copy this ‘repaired’ workfile back to the original file. Here’s how:
2. use the “Select output type and output form” and set “Output type” to ‘3’.
3. fill in a libraryname (fx QRPLOBJ) and a name for the workfile (fx WORKFILE) and set “Data in file” to ‘1’.
4. use the “Specify processing options” and set “Ignore decimal data errors” to ‘Y’
5. end querydefinition and run it.
6. CPYF FROMFILE(QRPLOBJ/WORKFILE) TOFILE(MYLIB/MYFILE) MBROPT*REPLACE) </pre>