Learn it on Mainframe Path. Do it with MainframeKit.Learn on Mainframe Path ▸
MainframeKit

-901

SQLSTATE 58004NEGATIVE SQLCODE

A system error stopped this one SQL statement from running. Later statements in the same program can still work.

MOST LIKELY

The statement length is outside the allowed range.

FIRST CHECK

If an abend occurred, tell the system programmer so it can be analysed.

TRY IT ▸

Site search

What it means

Db2 could not run the statement because of a problem inside the system, not because of how the statement was written. The error does not stop later SQL statements. SQLSTATE is 58004.

Db2 may also ask for an X'04E' abend of the application. If that happens, the system programmer needs to look at the abend.

Typical causes

  • The statement length is outside the allowed range.
  • Distributed commit processing failed, so the unit of work was backed out.
  • Commit post-processing did not finish, for example because of resource unavailability, held cursors, a partition-changing update or a uniqueness violation.
  • An accelerator server could not run a query that was sent to it.

How to fix it

  1. If an abend occurred, tell the system programmer so it can be analysed.
  2. Retry the statement, using a recovery routine if the program has one.
  3. If the error came at commit time, check the operator console and the ssnmMSTR job log for resource-unavailable messages.
  4. For an accelerator query, check the SQL for logic errors such as division by zero. If the SQL is fine, contact IBM Support with the accelerator-info value.

Example

Illustrative only; names and values are invented.

DSNT408I SQLCODE = -901, ERROR:  SYSTEM ERROR
DSNT418I SQLSTATE   = 58004 SQLSTATE RETURN CODE