IBM Mainframe Forum Index
 
Log In
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Register
 

DB2 PLAN - version, consistency token - confusion?


IBM Mainframe Forums -> DB2
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
Raghuraman_New

New User


Joined: 03 Oct 2008
Posts: 43
Location: Chennai,India.

PostPosted: Mon Jun 28, 2010 3:31 pm
Reply with quote

After looking at this earlier thread, I come up with a doubt, which is as follows, please guide me:

If the version is to support multiple versions of the same package in a single system . Why not consistency token can be used to maintain the versions .

It is always that the version and consistency token going to be unique across packages . Could you please help me to understand why we are going for versions and not consistency token(CONTOKEN) .

Thanks.
Back to top
View user's profile Send private message
Anuj Dhawan

Superior Member


Joined: 22 Apr 2006
Posts: 6250
Location: Mumbai, India

PostPosted: Mon Jun 28, 2010 5:34 pm
Reply with quote

You've replied to a 6-year old post. It's better to start a new thread with the reference to the old thread you've looked at. I'll split the thread to have new thread with your question, with subject line as : DB2 PLAN - version, consistency token - confusion? If you want to change it, please PM me.
Back to top
View user's profile Send private message
sushanth bobby

Senior Member


Joined: 29 Jul 2008
Posts: 1020
Location: India

PostPosted: Mon Jun 28, 2010 8:07 pm
Reply with quote

Hi Raghuraman,

Please go through this link http://ibmmainframes.com/about23965.html
(sticky missing in DB2 mainpage)

It will solve most of your confusion.

Quote:
Could you please help me to understand why we are going for versions and not consistency token(CONTOKEN) .

Suppose, you are working in a system where it supports multiple versions of packages. Like whenever, you go through the compilation process(precomp, compile, bind), and new package is created.

Scenario is,
1. Suppose you compile the program for the first time, you will get a load and package(V1), as one of the outputs.
2. you backup the load created by your first compilation to another PDS.
3. You again do a compilations, you will get a new load and package(V2).
4. You again do a compilations, you will get a new load and package(V3).

Now if you run the load that you took backup during the first compilation, it will use Package(V1) and not the package(v3).

Package and the load are related by consistency token.

Versions wont be like V1 or V2. Mostly, it will be a timestamp. Check SYSIBM.SYSPACKAGES table.

Why versions are used ?
Useful for testing & fallback.

Like you have your program, which is working perfectly now. Suddenly you get an idea to do some changes or you forgot to do some changes. You make the changes and now the program gives a different result, which you do not need.

Now all you have to do is to use the earlier load which you had backed up, to run the program.

And Ofcourse, you have to undo all the code changes you have done, that manual.
If you have a backup for that too, cool.

Thanks,
Sushanth
Back to top
View user's profile Send private message
Raghuraman_New

New User


Joined: 03 Oct 2008
Posts: 43
Location: Chennai,India.

PostPosted: Mon Jun 28, 2010 8:33 pm
Reply with quote

Sushanth ,
Thanks for you reply .
From your answer
"1. Suppose you compile the program for the first time, you will get a load and package(V1) and CONTOKEN (C1), as one of the outputs.
2. you backup the load created by your first compilation to another PDS.
3. You again do a compilations, you will get a new load and package(V2) CONTOKEN (C2).
4. You again do a compilations, you will get a new load and package(V3) and CONTOKEN (C3). "

Now my question is why do we need versions , if the consistency token itself being unique for different versions of programme. Since the CONTOKEN is differing every time we recompile , the CONTOKEN shall be used for maintaining versions.

Please advise .

Thanks
Back to top
View user's profile Send private message
dbzTHEdinosauer

Global Moderator


Joined: 20 Oct 2006
Posts: 6966
Location: porcelain throne

PostPosted: Mon Jun 28, 2010 8:36 pm
Reply with quote

Raghuram,

why did you not bother to browse the link provided?
Back to top
View user's profile Send private message
Raghuraman_New

New User


Joined: 03 Oct 2008
Posts: 43
Location: Chennai,India.

PostPosted: Mon Jun 28, 2010 9:34 pm
Reply with quote

Dick ,
I had gone through the provided link which was under the topic "Plans + DBRMS + Packages + Collections + Versions = Confusion" written by Bonnie Berker.

In the quarter 4 , it is given as below

" If the VERSION ID is the same as the current version, BIND will overlay the PACKAGE in its COLLECTION. But, if the VERSION ID is different from the current VERSION ID, BINDing the DBRM will produce a new PACKAGE that won't overlay the prior PACKAGE for the program"

But am confused with the CONTOKEN . If i am right the CONTOKEN will never be same for different VERSIONS of packages . So why do the new PACKAGE overlay the old one even if there was no concept of VERSIONS . Still the CONTOKEN can be used to differentiate the different versions of packages right.

Please correct me if i am wrong .
Thanks
Back to top
View user's profile Send private message
sushanth bobby

Senior Member


Joined: 29 Jul 2008
Posts: 1020
Location: India

PostPosted: Mon Jun 28, 2010 10:28 pm
Reply with quote

Raghu,

if package versioning is not implemented, you will not get C2 & C3 there will be only C1 and whenever you go through the compilation process C1 will get replaced always.

Since versioning is implemented, you are able to differentiate like
for Version V1 , C1 is the contoken,
for Version V2 , C2 is the contoken........

Sushanth
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic View Bookmarks
All times are GMT + 6 Hours
Forum Index -> DB2

 


Similar Topics
Topic Forum Replies
No new posts isfline didnt work in rexx at z/OS ve... CLIST & REXX 7
No new posts How to copy the -1 version of a membe... TSO/ISPF 4
No new posts Copying GDG version(all/few) from pro... CLIST & REXX 13
No new posts XMITIP Latest Version JCL & VSAM 2
No new posts How to determine TLS/SSL version in m... TSO/ISPF 2
Search our Forums:

Back to Top