RPG (IBM i / AS/400) · DB2 SQLCODE
What does SQLCODE -420 - Invalid Character Value for Cast mean in RPG (IBM i / AS/400)?
A CAST, or an implicit conversion such as assigning a character string to a numeric host variable, was given a string that isn't a valid representation of the target type - for example non-numeric text passed into a numeric conversion.
A CAST, or an implicit conversion such as assigning a character string to a numeric host variable, was given a string that isn't a valid representation of the target type - for example non-numeric text passed into a numeric conversion.
Validate that the source string is actually numeric before casting it, and scan for embedded blanks or stray characters that commonly leak in from flat-file or user-entered data.