According to the error(SQL0303), it looks like there is a mimatch in datatype between the program and the field in the DB. Maybe the new version of the OS has changed the way it handles or recognizes some datatypes, which causes the mismatch between the program and the field in the DB2 table? Don't know much about OS400, just an idea.
SQL0303N A value cannot be assigned to a host variable in the
SELECT, VALUES, or FETCH statement because the data
types are not compatible.
Explanation:
An embedded SELECT or VALUES statement selects into a host
variable, but the data type of the variable is not compatible
with the data type of the corresponding SELECT-list or
VALUES-list element. Both must be numeric, character, or
graphic. For a user-defined data type, the host variable might
be defined with an associated built-in data type that is not
compatible with the result type of the FROM SQL transform
function defined in the transform group for the statement. For
example, if the data type of the column is date or time, the data
type of the variable must be character with an appropriate
minimum length.
The statement cannot be processed.
User Response:
Verify that the table definitions are current and that the host
variable has the correct data type. For a user-defined data type,
verify that the associated built-in type of the host variable is
compatible with the result type of the FROM SQL transform
function defined in the transform group for the statement.
sqlcode : -303
sqlstate : 42806