-785 USE OF SQLCODE OR SQLSTATE IS NOT VALID
Explanation
The use of SQLCODE or SQLSTATE in an SQL routine body is invalid for one of the following reasons:
- SQLCODE or SQLSTATE was specified as a parameter name.
- SQLCODE is not declared as INTEGER in a return-codes-declaration clause.
- SQLSTATE is not declared as CHAR(5) in a return-codes-declaration clause.
- SQLCODE or SQLSTATE is assigned the value NULL.
System action
The statement cannot be processed.
User response
Correct the parameter list, declaration of an SQLCODE or SQLSTATE variable, or correct the assignment of a value to an SQLCODE or SQLSTATE variable.
SQLSTATE
428D8