- Trending Categories
Data Structure
Networking
RDBMS
Operating System
Java
iOS
HTML
CSS
Android
Python
C Programming
C++
C#
MongoDB
MySQL
Javascript
PHP
Physics
Chemistry
Biology
Mathematics
English
Economics
Psychology
Social Studies
Fashion Studies
Legal Studies
- Selected Reading
- UPSC IAS Exams Notes
- Developer's Best Practices
- Questions and Answers
- Effective Resume Writing
- HR Interview Questions
- Computer Glossary
- Who is Who
What is the execution result when non-SQL changes are made in the program without BIND?
Problem: A COBOL-DB2 program is changed to increase the length of a variable from PIC X(5) to PIC X(8). However, there are no changes in the SQL of the program. What will be the result if the program's plan/package is not binded for these changes?
Solution
The variable length change from PIC X(5) to PIC X(8) is not a DB2 change and there are no modifications required for SQL statements in the program. However, still we need to BIND its PLAN/PACKAGE else we will get SQL error code -818 which states that “THE PRECOMPILER-GENERATED TIMESTAMP x IN THE LOAD MODULE IS DIFFERENT FROM THE BIND TIMESTAMP y BUILT FROM THE DBRM z”.
Following is the reason for this SQL error - In each execution of a COBOL-DB2 program, the timestamp of load module and package/DBRM are compared. If there is a change in the length of the variable (and there are no SQL changes) in the program and it is compiled, then the load module will have the newly generated timestamp and on the other hand if the BIND is not performed, the package/DBRM would have an old timestamp. When this program is executed, the JCL step calling this program will fail with SQL error code -818.
If we have a COBOL-DB2 program for which SQL statement is never going to change in the future, we can pre-compile this program with option LEVEL. Below is the sample of the BIND step using the LEVEL option.
Example
//BIND EXEC PGM=IKJEFT01 //STEPLIB DD DSN=DIS.TEST.LOADLIB,DISP=SHR //SYSOUT DD SYSOUT=* //SYSTSIN DD * DSN SYSTEM(TB3) BIND PLAN(PLANA) - PKLIST(PACKA) - LEVEL - ACQUIRE(ALLOCATE) - ISOLATION (RS) /*
- Related Articles
- What is the execution result when non-SQL changes are made in a DB2 program without BIND?
- What is the execution result when a DB2 program is compiled and bound on separate days?
- What is the execution result when a DB2 program is compiled and binded on separate days?
- When a DB2 subprogram undergoes changes, do we need to BIND it with its program?
- What is natural and man made changes?
- What are the changes we can make in our society without much effort?
- What are the different changes happened in an object when force is applied to it?
- What are changes that occur in an incense stick, when it is burnt? Can these changes be reversed?
- How to display a SQL execution progress along with execution plan in Oracle?
- Implementation of a table level locks in a COBOL-DB2 program during SQL execution
- What is the order of execution of non-static blocks with respect to a constructor in Java?
- How to validate the syntax of a Oracle dynamic SQL before execution ?
- Execution time while running a SQL query in HANA Studio
- How to monitor real time SQL execution statistics in Oracle?
- Describe the two changes that are seen when a candle burns.
