Troubleshooting
Problem
-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
Was this topic helpful?
Document Information
Modified date:
16 June 2018
UID
swg21608714