Sei sulla pagina 1di 4

-818 TIMESTAMP MISMATCH ANALYSER

Author: Venkatesh P Rajagopalan


Date : 04/20/06
Internet Address: venkatesh_rajagopalan@in.ibm.com

OVERVIEW:

There is always a speculation for the developer whether the plan is bound to database
after compiling (Recompiling) the source which in turn if handled asynchronously results
in run time error. And In addition frequency of this Specific error is high particularly when
numerous embedded application programs are going to be promoted to production
environment, moreover this program can be used to determine whether the Compilation
and Bind are in place and synchronous.

Extracting the timestamp from the Load module and Plan is always tedious. To check
and compare the synchronicity is complex too. And this source eliminates that difficulty.
By only accepting Plan and Source name as input gives reliable information on
Timestamps (Load and Plan) and Advisory message.

NOTE: This program is prepared for the Developers who works on Mainframe platform
with DB2 as Database and any application language .The program is composed in PL\1,
handles any load module(Any Application program) present in the load Library and plan
present in system catalog SYSIBM.SYSPLAN compares the timestamp of two and
advises accordingly.

ABOUT THE PROGRAM:

The Designed program aims at preventing the cause of timestamp mismatch error
between the Plan and modified source file. Briefly the program tries to prevent the -818
error, which is caused when the compile, and link, is done without doing a BIND of the
application,

The program reads the Load module (Compiled embedded application source)
and Plan as Input, and it checks the timestamp generated during the compilation
and the plan bound timestamp and advises the developer when the source is
compiled? (recompiled) and whether the plan is bound after recompilation or not?
.The output can be any of the two following instances.

-818 TIMESTAMP MISMATCH ANALYSER


Note: The Timestamp in DBRM can also be queried and be compared, instead of Load
module timestamp .Since both are equal the program handles the load module TS and
not the DBRM TS.But either way will work out.

If the Plan is not bound after Compilation (recompilation) then it advises the developer to
bind the plan or informs him that deferred binding is carried out additionally it prints the
timestamp of both the compilation process and plan bound process. On the other hand if
plan is bound after compiling (Recompiling) the source it provides the information that
the plan is bound after compilation (recompilation) and informs that Compile and bind
are carried systematically additionally it prints the timestamp of both the compilation
process and plan bound process.

(SCHEMATIC REPRESENTATION OF THE PROGRAM IS GIVEN BELOW ON P4)

Sample output of the program is given below,

CASE 1:

There is a Program CHWDBDR( embedded application source) which is recompiled or


compiled and the Plan pertains to that specific source called CHWDBDR, is not bound
after Compilation (recompilation) then the output of the program looks like below,

************START OF REPORT*********************

NAME OF THE PLAN IS :CHWDBDR

NAME OF THE SOURCE IS :CHWDBDR

PROGRAM RECOMPILED TIMESTAMP IS(YYYYMMDDHHMMSS):20060419100334

RECENT PLAN BOUND TIMESTAMP IS(YYYYMMDDHHMMSS):20060417110212

ADVISORY MESSAGE:COMPILATION DONE AFTER BINDING PLAN

POSSIBLITY OF DEFERRED BINDING CARRIED OUT

***********CONSISTENCY TOKEN FAIL***************


**CAUTION**RUN TIME ERROR OF -818 MAY OCCUR*****

***************END OF REPORT***********************

-818 TIMESTAMP MISMATCH ANALYSER


CASE 2:

There is a Program SPDTEMP( embedded application source) which is recompiled or


compiled and the Plan pertains to that specific source called SPDTEMP, is properly
bound after Compilation (recompilation) then the output of the program looks like below,

***************START OF REPORT******************

NAME OF THE PLAN IS :SPDTEMP

NAME OF THE SOURCE IS :SPDTEMP

PROGRAM RECOMPILED TIMESTAMP IS(YYYYMMDDHHMMSS):20060420094506

RECENT PLAN BOUND TIMESTAMP IS(YYYYMMDDHHMMSS):20060420094721

ADVISORY MESSAGE:PLAN BOUND AFTER COMPILING THE PROGRAM

*************CONSISTENCY TOKEN PASS****************

***************END OF REPORT***********************

CASE3:

This case is ultimately very rare and possibilities are less to occur.

There is a Program SPDTEMP (embedded application source) which is recompiled or


compiled and the Plan pertains to that specific source called SPDTEMP, is bound at the
same time when the source is recompiled. In this case the program advises the
developer to repeat the Compile and Bind process (as the program can’t compare
beyond seconds,like microsecond in the timestamp attribute).

REQUIREMENTS:

Developer should have

1. Select access on SYSIBM.SYSPLAN Catalog table.


2. Read access of the Load module which is being given as a input.
3. PL\1 V2 R3 compiler to compile the Analyzer program (since it is written in PL\1).
4. Access to DB2 subsystem and running a Job is necessary before submitting the JCL.

NOTE:

Please download the PL\1 source and JCL and run the JCL against the compiled source

-818 TIMESTAMP MISMATCH ANALYSER


FLOW DIAGRAM:

LOAD MODULE
NAME PLAN NAME

THE PROGRAM
AMBLIST Timestamp of the
returned output Plan (bind) is taken
is used to from
compute the
SYSIBM.SYSPLAN
timestamp of the
load module

REPORT
After Examining the Timestamps of
the Load module and Plan, program
prints report advises the developer
about the status.

-818 TIMESTAMP MISMATCH ANALYSER

Potrebbero piacerti anche