PL/I · DB2 SQLCODE

SQLCODE -404: String Too Long for the Target

What does SQLCODE -404: String Too Long for the Target mean in PL/I?

An INSERT, UPDATE, or host-variable assignment tries to store a character or graphic string longer than the target column or host variable can hold — often a PL/I VARCHAR host structure whose declared length is shorter than the data actually being moved into it.

SQLCODE -404: String Too Long for the TargetDB2 for z/OS · PL/I (embedded SQL)

Condition

An INSERT, UPDATE, or host-variable assignment tries to store a character or graphic string longer than the target column or host variable can hold — often a PL/I VARCHAR host structure whose declared length is shorter than the data actually being moved into it.

Fix

Check the PL/I host variable's declared length against the column definition, and truncate or reject oversized input before the SQL statement executes rather than relying on DB2 to catch it.

Related db2 sqlcode