-525 error on NULLID.SYSSTAT package when trying to set CURRENT SCHEMA against a DB2 for z/OS database

Technote (troubleshooting)


Problem(Abstract)

-525 error on NULLID.SYSSTAT package when trying to set CURRENT SCHEMA against a DB2 for z/OS database

Symptom

When trying to set the CURRENT SCHEMA, a -525 error may occur on the NULLID.SYSSTAT package.

Below is an example of the error that may be displayed:

DSNT408I SQLCODE = -525, ERROR: THE SQL STATEMENT CANNOT BE EXECUTED BECAUSE,
IT WAS IN ERROR AT BIND TIME FOR SECTION = 34 PACKAGE = DBB0.NULLID.SYSSTAT CONSISTENCY TOKEN = X'5359534C564C3031' ,
DSNT418I SQLSTATE = 51015 SQLSTATE RETURN CODE
DSNT415I SQLERRP = DSNXERT SQL PROCEDURE DETECTING ERROR
DSNT416I SQLERRD = -230 0 0 -1 0 0 SQL DIAGNOSTIC INFORMATION
DSNT416I SQLERRD = X'FFFFFF1A' X'00000000' X'00000000' X'FFFFFFFF' X'00000000' X'00000000' SQL DIAGNOSTIC INFORMATION

CURRENT SCHEMA can be set different ways:
- SET CURRENT SCHEMA command
- CurrentSchema keyword


Diagnosing the problem

From DB2 Connect command line, connect to the DB2 for z/OS database, then run the below query to determine the status of the section 34. :


db2 "select contoken, SEQNO, STMTNO , SECTNO, STATUS FROM
SYSIBM.SYSPACKSTMT WHERE COLLID = 'NULLID' AND NAME = 'SYSSTAT'"

C
Compiled - statement was bound successfully using defaults for input variables during access path selection.

L
Bad - the statement has some allowable error. The bind continues but the statement cannot be executed.


Resolving the problem

Rebind the DB2 packages with the ACTION REPLACE option so that the packages are replaced and try again.

Use the following commands:
db2 connect to <db> user <username> using <password>
db2 bind @ddcsmvs.lst action replace blocking all grant public sqlerror continue

These commands should be issued from one of the following locations:

UNIX: $INSTHOME/sqllib/bnd
Windows: DB2DIR\bnd (Where DB2DIR is the directory where DB2 Connect was installed. The default location is C:\Program Files\IBM\SQLLIB)

Verify the status of the section 34 by querying the system catalogs, ensure it is 'C'

  • If you still experience -525 error after rebinding the packages with ACTION REPLACE and the system catalogs still indicate a status of 'L' for section 34, then try the following from DB2 Connect command line:

    db2 connect to <db> user <username> using <password>
    db2 drop package NULLID.SYSSTAT
    db2 bind @ddcsmvs.lst blocking all grant public sqlerror continue

    Verify the status for section 34 again which should be 'C'.

Related information

Binding applications and utilities
CurrentSchema
CURRENT SCHEMA
SYSIBM.SYSPACKSTMT table

Rate this page:

(0 users)Average rating

Add comments

Document information


More support for:

DB2 Connect

Software version:

9.5, 9.7, 10.1

Operating system(s):

AIX, HP-UX, Linux, Solaris, Windows

Reference #:

1608714

Modified date:

2014-01-31

Translate my page

Machine Translation

Content navigation