COBDB0103 host-var definition does not match the column type associated with it.

The host variable data definition does not match the column type associated with it in the SQL statement. For example, you would get this error if you use a host variable defined as PIC X(n) with a column defined as SMALLINT.

Resolution:

Verify that the host variable definition corresponds appropriately to the column definition and make any changes to correct the error. Alternatively use the Host Compatibility Option DCLGEN tool to generate a copybook of the host variable for the SQL table in question.

If your code contains a multiple-level group name in a FETCH or singleton SELECT, recompile using the GEN-HV-FROM-GROUP DB2 compiler directive option.