COBOL · DB2 SQLCODE

SQLCODE -305

What does SQLCODE -305 mean in COBOL?

Null value with no indicator variable. A column value was NULL, but the host variable receiving it has no null indicator variable to hold that condition, so DB2 cannot represent the result.

SQLCODE -305DB2 for z/OS · Db2 (embedded SQL in COBOL)

Condition

Null value with no indicator variable. A column value was NULL, but the host variable receiving it has no null indicator variable to hold that condition, so DB2 cannot represent the result.

Fix

Add a null indicator variable to the host variable pair in the SELECT INTO or FETCH, and check it after every fetch before using the value.

Pending source verification. Not yet checked against official documentation.

Related db2 sqlcode