View previous topic :: View next topic
|
Author |
Message |
naveensri2005 Currently Banned New User
Joined: 22 Mar 2005 Posts: 51 Location: chennai
|
|
|
|
hi guys,
what is the difference between plan and package? why package is not a executable?
what is the advantages of the paln and disadvantages of the packages?
regards
naveen |
|
Back to top |
|
|
narasimha_devi Warnings : 1 New User
Joined: 10 Mar 2005 Posts: 26
|
|
|
|
package cantains one r more DBRMs.packages are obtained by passing DBRMs through bindpackage.package ia not executable because it does not contain any acess path.
plan is obtained by binding DBRMs r packages.plan is executable as it contains the acess path.
it is advantageous to use packages because
it reduces the cost of bind
it reduces rebound time
if there r modifications in the sub program its just enough to crete a package 4 that sub pgm.
lock options and various bind options can b controlled even in the subpgm level itself.
corrections are welcome |
|
Back to top |
|
|
raghs_sir
New User
Joined: 19 Jul 2005 Posts: 9 Location: Chennai
|
|
|
|
hi all,
A package is made from only one DBRM (not one or more DBRMs).
If we modify SQL statement in our source code only that particular DBRM is rebound and it saves the processor time and other resources. |
|
Back to top |
|
|
khamarutheen
Active Member
Joined: 23 Aug 2005 Posts: 677 Location: NJ
|
|
|
|
hi frnd,
the plan is done by DBRM. as said by above frnds its a executable. the plan is binded. but if any error occurs all the plan should be rebinded. it will take time. where as package will have some plans in individual or group. if any error then that particular plan can be binded without affecting one another. so it reduces the cost of binding and the time of rebinding |
|
Back to top |
|
|
Kavitha Palani
New User
Joined: 16 Nov 2005 Posts: 8
|
|
|
|
Plan is a DB2 object (produced during the bind process) that associates one or more database request modules with a plan name.
They contain executable code for SQL statements for one DBRM. The advantages of using PACKAGE are:
1. Avoid having to bind a large number of DBRM members into a plan
2. Avoid cost of a large bind
3. Avoid the entire transaction being unavailable during bind and automatic rebind of a plan
4. Minimize fallback complexities if changes result in an error. |
|
Back to top |
|
|
snap_315
New User
Joined: 26 Apr 2005 Posts: 1
|
|
|
|
Can we create a plan for a cobol-db2 program where we have not included any sql statements in it?? |
|
Back to top |
|
|
twissi
Active User
Joined: 01 Aug 2005 Posts: 105 Location: Somerset, NJ
|
|
|
|
Hi Snap_315,
How can you code a COBOL-DB2 program without having a single SQL statement in it? Your COBOL program becomes a COBOL-DB2 program only when it has at least a DB2 statement in it!.
Now, if you were referring to a COBOL program that was declared as a COBOL+DB2 (on endevor) program, yes, I would say you can code a program where no SQL statements are included. The compiler would produce an empty DBRM, but, you would still be able to execute the program using the LOAD module.
Hope this makes sense!
Cheers, Twissi. |
|
Back to top |
|
|
Sahoo
New User
Joined: 08 Jun 2006 Posts: 53
|
|
|
|
Could any clear this?
It is said you need to rebind all the programsbound to a plan if any one of the program is changed.
Supposei have 5 programs .. all are independednt. They all are bound to only one plan. I changed one of these programs.. Do i need to rebind other 4 progams ? If so why? |
|
Back to top |
|
|
twissi
Active User
Joined: 01 Aug 2005 Posts: 105 Location: Somerset, NJ
|
|
|
|
Sahoo,
If you've 5 programs, you create 5 distinct PACKAGEs and then club them together using a PLAN. So, in your case, you will have to update (re-bind) the PACKAGE that represents the changed program and your PLAN will automatically take the latest one.
You don't have to rebind the other unchanged programs.
Hope this clarifies your doubt.
Cheers, Twissi. |
|
Back to top |
|
|
Sahoo
New User
Joined: 08 Jun 2006 Posts: 53
|
|
|
|
@ twissi
Thanks for your response. I am not using package. I am using only plan.
Sahoo |
|
Back to top |
|
|
twissi
Active User
Joined: 01 Aug 2005 Posts: 105 Location: Somerset, NJ
|
|
|
|
Sahoo,
For your information, you can't BIND more than one program without using PACKAGEs!
Cheers, Twissi. |
|
Back to top |
|
|
mk_kumar315
New User
Joined: 21 Nov 2005 Posts: 10
|
|
|
|
Hi,
If Iam having only one pgm then i believe Package is good and sufficient.
And also there are few advantages if we use package instead of plan.
But my doubt is: I read from above posts that Package is NOT Executable. If so then how can i get the execution of this pgm by using package.
Please let me know if I am wrong.
Thanks in advance
Kumar.... |
|
Back to top |
|
|
nelson.pandian
Active User
Joined: 09 Apr 2008 Posts: 133 Location: Phoenix, AZ
|
|
|
|
Hi mk_kumar315,
The best option for you is to use PLAN because you are having only one program. And for your info Without PLAN you can't execute PACKAGE. |
|
Back to top |
|
|
|