SQLCODE -302
SQL0302 Conversion error on an input variable
- IBM message text
- Conversion error on variable or parameter &2.
- SQLCODE
- -302
- SQLSTATE
- 22001, 22003, 22023, 22024
Most common cause
The value of a variable or parameter cannot be converted for the statement: too long, out of range or invalid. The message gives the error type.
Other causes
- A numeric variable with invalid decimal data (error type 6).
- A value too long for a character parameter in a CALL (type 9).
How to fix it
Define variables with LIKE or EXTNAME on the table, so they have the column's type and length, and initialize data structures.
Related errors
Text and codes from IBM documentation for 7.6. Checked on .