Hi,
I'm a beginner in DB2.
Regarding precompile, till now what i have understood are -
1. During precompile, the precompiler places the SQL statements in DBRM and would replace all SQL statements in a COBOL-DB2 program to 'CALL' statements (this would essentially call SQL statements in DBRM during run time). The order of SQL statements in COBOL program and DBRM would be same.
DBRM will contain SQL statements of various program at the same time.
2. Also, the precompiler would generate Timestamp for each SQL statement so that Timestamp for any SQL statement in COBOL program and in DBRM is same.
3. The 'Pure' COBOL program is now compiled, link edited to form a load module
4. The DBRM is bound (BIND). Then DB2 stores the DBRM timestamp for run time use.
This ends the formation of load module steps (i believe)
During run time, the timestamp in COBOL program is compared with timestamp in DBRM to ensure that COBOL program executes correct SQL statements.
My Questions are,
1) During run time, when time stamp is checked, how does system identifies the SQL statement of a particular COBOL program in DBRM when there are SQL statements of various programs in DBRM ? If the answer is 'timestamp', then why does -818 error (timestamp mismatch) occur.
2) What is a Plan,
3) What is a Package,
4) What is Bind Plan / Package
5) Also please tell me whether my understanding so far is correct
Your help would address a long standing doubt in me.
Thanks in advance.
Sorry if i have written a big story.
Regards,
Mohamed Abdullah