-525   THE SQL STATEMENT CANNOT BE EXECUTED BECAUSE IT WAS IN ERROR AT BIND TIME FOR SECTION = sectno PACKAGE = pkgname CONSISTENCY TOKEN = contoken

Explanation

One of the following:
  • The statement was in error when the package was bound, but the error was ignored then because the option SQLERROR (CONTINUE) was used. Since the statement contains an error, it cannot be executed.
  • The statement might not be an executable statement at this location, or might only be executable by a DB2® application requester (for example, DECLARE TABLE in an application running on OS/2 causes this message).
The variables are:
sectno
Section number
pkgname
locid.collid.pkgid
contoken
Consistency token in hexadecimal

System action

The statement cannot be processed.

Programmer response

If the SQL statement is not supposed to execute at the indicated location, then correct the program so that the statement in error does not execute at that location. Precompile, compile, and bind replace the package. If the SQL statement is supposed to execute at the indicated location, correct the problem found when it was bound and bind the package over using BIND with ACTION(REPLACE). If multiple versions of the package have been bound, issue the following SELECT statement to determine which version has the error: SELECT VERSION FROM locid.SYSIBM.SYSPACKAGE WHERE LOCATION = ' ' AND COLLID = 'collid' AND NAME = 'pkgid' AND HEX(CONTOKEN) = 'contoken'

Where:
locid
Location name
collid
Collection id
pkgid
Program name

SQLSTATE

51015