Learn it on Mainframe Path. Do it with Mainframe KIT.Learn on Mainframe Path ▸
Mainframe KIT ● Nothing leaves this tab

-901

Unsuccessful execution due to a system errorNEGATIVE SQLCODE · CHECKED 2026-10-31
Checked against IBM documentation

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

QUICK ANSWER

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

LIKELY CAUSES, IN THE ORDER OF THIS ENTRY

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

CHECKED 31 Oct 2026 IBM: Db2 12 for z/OS Codes: -901

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