MainframeKit

-924

SQLSTATE 58006NEGATIVE SQLCODE

The connection to Db2 failed because of an unexpected internal error in the connection; the function, return and reason codes give the detail.

MOST LIKELY

A problem in the attachment facility used (TSO, CAF, RRSAF, CICS or IMS).

FIRST CHECK

Note the function code, return code and reason code from the message.

TRY IT ▸

MainframeKit assistant

What it means

The attachment code that links your program to Db2 hit an internal error, so no connection was made. The message carries a function code, a return code and a Db2 reason code that identify the problem.

Do not keep running SQL after -924: results are unpredictable.

Typical causes

  • A problem in the attachment facility used (TSO, CAF, RRSAF, CICS or IMS).
  • Mismatched or wrong Db2 load libraries in the job's STEPLIB or the region.
  • An environment problem that stops the connection from being set up.

How to fix it

  1. Note the function code, return code and reason code from the message.
  2. Look up the reason code in the Db2 reason codes documentation.
  3. Check that the job or region uses the correct Db2 load libraries for this subsystem.
  4. Collect the job log and SYSLOG and contact the Db2 system programmer if the cause is not clear.