Portal | Manuals | References | Downloads | Info | Programs | JCLs | Master the Mainframes
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Usergroups Profile Log in to check your private messages Log in
 

 

DB2 PLAN - version, consistency token - confusion?

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> DB2
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    Post subject: DB2 PLAN - version, consistency token - confusion?
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

Senior Member


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

PostPosted: Mon Jun 28, 2010 5:34 pm    Post subject:
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: 1013
Location: India

PostPosted: Mon Jun 28, 2010 8:07 pm    Post subject:
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    Post subject:
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    Post subject:
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    Post subject:
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: 1013
Location: India

PostPosted: Mon Jun 28, 2010 10:28 pm    Post subject:
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    IBMMAINFRAMES.com Support Forums -> DB2 All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts GDG version number PANDU1 JCL & VSAM 4 Sat Mar 04, 2017 8:28 pm
No new posts Bind plan as a member to another bind... rexx77 DB2 0 Thu Feb 16, 2017 2:02 am
No new posts COBOL Version 6.1 Virendra Shambharkar COBOL Programming 15 Tue Nov 01, 2016 11:24 am
No new posts Is there a time Version of DATEDIFF ? Bill Woodger DFSORT/ICETOOL 1 Wed Aug 17, 2016 7:06 pm
No new posts Syncsort version supporting FINDREP c... juares castro SYNCSORT 9 Tue Aug 09, 2016 6:54 pm


Facebook
Back to Top
 
Mainframe Wiki | Forum Rules | Bookmarks | Subscriptions | FAQ | Tutorials | Contact Us