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

-204

Undefined nameNEGATIVE SQLCODE · CHECKED 2026-11-14
Checked against IBM documentation

The object named in the message is not defined in the Db2 subsystem. It can apply to any type of Db2 object.

QUICK ANSWER

The object named in the message is not defined in the Db2 subsystem. It can apply to any type of Db2 object.

LIKELY CAUSES, IN THE ORDER OF THIS ENTRY

  1. The object name or its qualifier is misspelled or wrong.
  2. The object does not exist in this subsystem.
  3. A routine was not defined with CREATE PROCEDURE or CREATE FUNCTION, or not activated.
  4. For COMMENT or DROP on a package, the requested version does not exist.

CHECKED 14 Nov 2026 IBM: Db2 13 for z/OS: SQLCODE -204 (Db2 for z/OS 13.0.0)

MOST LIKELY

The object name or its qualifier is misspelled or wrong.

FIRST CHECK

Verify the name and any qualifiers in the SQL statement.

TRY IT ▸

Site search

What it means

Db2 does not know the named object. The token may include a version identifier. SQLSTATE is 42704 or 46002.

Typical causes

  • The object name or its qualifier is misspelled or wrong.
  • The object does not exist in this subsystem.
  • A routine was not defined with CREATE PROCEDURE or CREATE FUNCTION, or not activated.
  • For COMMENT or DROP on a package, the requested version does not exist.

How to fix it

  1. Verify the name and any qualifiers in the SQL statement.
  2. Make sure the object exists before resubmitting.
  3. For a routine, issue CREATE PROCEDURE or CREATE FUNCTION and then the -START PROCEDURE command.
  4. For a package, use the VERSION clause to identify the version.
  5. Check that the application compatibility setting is correct.