What it means
When a Db2 program is precompiled, the precompiler writes the same timestamp (the consistency token) into two places: the DBRM and the modified program that is compiled and link-edited into the load module. BIND copies the DBRM's token into the package. At run time Db2 compares the token in the load module with the one in the package. -818 means they differ: the module and the package come from different precompiles.
Typical causes
- The program was precompiled, compiled and link-edited again, but the new DBRM was never bound.
- The bind step used another DBRM: an old copy kept for backout, a test library, or the wrong member.
- An older or newer load module was picked up (STEPLIB order, a promotion that copied only the module).
How to fix it
- Decide with the application owner which version should run (usually the new one).
- Bind the DBRM from the same precompile as that load module: BIND PACKAGE(collection) MEMBER(program) LIBRARY('dbrm.library') ACTION(REPLACE).
- Or, for a backout, put back the old load module and bind (or keep) the old DBRM that matches it.
- Rerun and check the program gets past its first SQL statement.
Example
Illustrative only; names and values are invented.
DSNT408I SQLCODE = -818, ERROR: THE PRECOMPILER-GENERATED TIMESTAMP
1B51A3E40C77D2F6 IN THE LOAD MODULE IS DIFFERENT FROM THE BIND
TIMESTAMP 1B2C88F1D4A09E35 BUILT FROM THE DBRM FEECALC
DSNT418I SQLSTATE = 51003 SQLSTATE RETURN CODE