Verification of Consistency token in SYSPACKAGE, DBRMLIB and LOADLIB. When a Job abends at a program due to bind error with SQL code of -805 or -818 then generally there is issue with consistency token (often referred as CONTOKEN). These kind of abends can be easily fixed if we can find where the CONTOKEN mismatch occurs. STEP1:- CONTOKEN in Package
SELECT NAME, CONTOKEN, COLLID, PDSNAME FROM SYSIBM.SYSPACKAGE WHERE NAME=’MODULE’
Provide the name of the module in “NAME” and Collection name in “COLLID” In the Query output dataset locate the CONTOKEN value and view it in HEX mode (by issuing HEX ON command) The contoken in the above image is STEP2:- CONTOKEN in DBRMLIB The “PDSNAME” field above will indicate the DBRMLIB used for binding the module. Open the DBRM for the above module, it will have the same name as the module name. Search for the contoken in hex mode by entering the following command (The CONTOKEN in the DBRM is generally at the 25th position as shown in the figure above) If the CONTOKEN in Step1 and Step2 does not match then Run the Bind job to fix the inconsistency. Bind Job is going to update the CONTOKEN in the SYSIBM.SYSPACKAGE Table. STEP3:- CONTOKEN in loadlib -Since the date and time part of the CONTOKEN are swapped in loadlib, you will have to split the CONTOKEN found in SYSPACKAGE table in two halves of 8 chars each and then swap their positions. Swapping positions and joining them back will result in the CONTOKEN Go to the load library where the load to be checked is present. CONTOKEN in Composite load of the link Open the composite load and search for the reversed CONTOKEN in hex mode in the composite load If its found, no problem and if not then you need to process the link to fix the issue. CONTOKEN in load of the program Open the load object for the program, it generally has the same name as the module name. Now search for the reversed CONTOKEN in hex mode in the load of the program using command Note:- If the CONTOKEN is found then its fine and if not then you will need to recompile and also relink(if composite load also doesnt has this) to fix the issue.