Friday, February 4, 2011

How To Match Contoken Across Loadlib & DBRM


Step 1.
Go to SYSIBM.SYSPACKAGE for that program - look at the latest bind -
you can look at the time stamp column to find the latest. There will be a column
called CONTOKEN. This will have a value.
Ex -
-+---------+---------+---------+---------+---------+---------+---------+----
COLLID NAME CONTOKEN OWNER CREATOR TIMESTAMP
-+---------+---------+---------+---------+---------+---------+---------+----
CBPR39WO PGMNAME .îÒ#.¹". DFDBS ABC
2004-04-21-06.42.00.
Step 2 .
Covert the CONTOKEN to zoned decimal format. From the above example it
is X'1756ed7b02da7f32'. You can use HEX on to find the ZD forma t.
Step 3.
Go to the DBRMLIB - Search for this String like - F x'1756ed7b02ad7f32'
. If it is the correct DBRM lib using which it is bound then you will find a match.
Also you can get the DBRMLIB used for binding from the above Query o/p
also if you scroll towards the end. There is a Column for that also. Now How to match it to load lib .
Step 4.
Go to your load lib in browse mode. Search for the First 8 bytes in the
above ZD format of the CONTOKEN
Like =-- F '1756ed7b'. If you find a match then it is your matching load !!!
The twist here is - on the SYSIBM.SYSPACKAGE and The DBRMLIB the
contoken is stored in the Same format, But in the Loadlib the date & time part of
the CONTOKEN is swapped and stored. This is why you need to search for the
8 bytes separately. Otherwise you need to swap the 16 bytes of the
CONTOKEN and search.

No comments:

Post a Comment