In the first edition of 2006 we continue with our exploration of -818 SQLCODE:
SELECT NAME,HEX(TIMESTAMP) FROM SYSIBM.SYSDBRM WHERE NAME='EMPUPDT' The timestamp will have 16 HEX characters - this is the internal DB2 timestamp which we need. It might appear as: TIMESTAMP (from SYSDBRM): 17C3C25806552EE8 Also there are columns which provide the precompile time and date etc. For example: PRECOMPTS: 2005-12-26-05.32.47.566011 (gives the precompile time). Next question is where is this physically stored? From the precompile JCL you can find out the PDS where the DBRM was created. Or even in the SYSDBRM table we have a column called PDSNAME which will contain the name of the PDS where the DBRM exists. Go to this PDS and open the member EMPUPDT in view mode. Now try to find the timestamp here. Command for finding hex characters is: F x'17C3C25806552EE8' and voila! It'll appear (it'll appear as junk characters so type HEX ON to see the complete hex value). So now we know where in the DBRM the timestamp is stored and how to check it. Similarly in the table SYSIBM.SYSPLAN if we query for: NAME='EMPPLAN' we'll get details on when the plan was bound. Something like: BOUNDTS: 2005-12-26-05.32.50.735223
Next we need to locate the timestamp in the load module. That we shall see in the forthcoming editions...
Continuing with the -818 story: Next we need to look into the load module.
A quick way of figuring out the problem when -818 is encountered:
Now you might ask, "that's good but where's this internal timestamp stored in the load module"? To be continued...
After a brief hiatus of 3 weeks KRs are back.
We continue with the -818 error...
We'll conclude this in the next edition; for now do take a look into the structure that is created for each SQL statement by the precompiler; you'll find a lot of interesting things there.
Copyright © 2020 Sethu Subramanian All rights reserved. Reach me via email at ssbell @ gmail.com