PL/I · DB2 SQLCODE

SQLCODE -408: Value Not Compatible with the Data Type of Its Target

What does SQLCODE -408: Value Not Compatible with the Data Type of Its Target mean in PL/I?

An assignment target — host variable, column, or parameter — received a value whose data type category doesn't match what's expected. In PL/I programs this is frequently a DECIMAL host variable receiving a value from a column with a distinct type, or a locator assigned where a plain value belongs.

SQLCODE -408: Value Not Compatible with the Data Type of Its TargetDB2 for z/OS · PL/I (embedded SQL)

Condition

An assignment target — host variable, column, or parameter — received a value whose data type category doesn't match what's expected. In PL/I programs this is frequently a DECIMAL host variable receiving a value from a column with a distinct type, or a locator assigned where a plain value belongs.

Fix

Verify the DCLGEN-generated host variable types line up with the actual column types for every host variable used in the statement, paying particular attention to distinct types and LOB locators.

Related db2 sqlcode