I think the easiest thing to do is to identify the problem character(s), and replace them with something harmless in the source. Inspect the records that fail,and identify the offending character(s). Note that the green-screen command DSPPFM offers a hex viewing mode that is handy for this purpose.
For example, let's say the offending character is always the same - an x'20'. Open up a green-screen session and use the STRSQL command (or use Navigator, or use any other query facility that you are comfortable with that will pass a native SQL query through to DB2/400 for execution:
UPDATE tablename set DOMNOTES = TRANSLATE(DOMNOTES,X'20','
?')
This will update the DOMNOTES field in every record, translating ant x'20' characters that it finds to question marks (or whatever character you specify.
You can also handle multiple character mappings at once, just contcatenate together the bad characters in the second Translate parameter, and the target characters in the third parameter:
UPDATE tablename SET Domnotes = TRANSLATE(Domnotes,x'20' || x'21', '??')
Every time TRANSLATE encounters and x'20' it maps it to "?". Every time an x'21' is encountered, it also gets mapped to a "?".
I didn't test this, so you may have to tweak a bit. Of course, test it over test data!
DB2/400 SQLTRANSLATE function:
http://publib.boulder.ibm.com/infocenter/iseries/v5r4/index.jsp?topic=/db2/rbafzmstscale.htm (Search the list fot TRANSLATE).- Gary Patterson