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

Major difference between plan and package


IBM Mainframe Forums -> Mainframe Interview Questions
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
naveensri2005
Currently Banned

New User


Joined: 22 Mar 2005
Posts: 51
Location: chennai

PostPosted: Mon Jul 25, 2005 11:43 am
Reply with quote

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
View user's profile Send private message
narasimha_devi
Warnings : 1

New User


Joined: 10 Mar 2005
Posts: 26

PostPosted: Mon Jul 25, 2005 1:49 pm
Reply with quote

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
View user's profile Send private message
raghs_sir

New User


Joined: 19 Jul 2005
Posts: 9
Location: Chennai

PostPosted: Tue Jul 26, 2005 4:03 pm
Reply with quote

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
View user's profile Send private message
khamarutheen

Active Member


Joined: 23 Aug 2005
Posts: 677
Location: NJ

PostPosted: Thu Nov 03, 2005 2:15 pm
Reply with quote

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
View user's profile Send private message
Kavitha Palani

New User


Joined: 16 Nov 2005
Posts: 8

PostPosted: Tue Nov 22, 2005 5:16 pm
Reply with quote

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
View user's profile Send private message
snap_315

New User


Joined: 26 Apr 2005
Posts: 1

PostPosted: Sun Apr 23, 2006 8:10 am
Reply with quote

Can we create a plan for a cobol-db2 program where we have not included any sql statements in it??
Back to top
View user's profile Send private message
twissi

Active User


Joined: 01 Aug 2005
Posts: 105
Location: Somerset, NJ

PostPosted: Mon Apr 24, 2006 5:23 pm
Reply with quote

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
View user's profile Send private message
Sahoo

New User


Joined: 08 Jun 2006
Posts: 53

PostPosted: Sun Jan 21, 2007 1:14 pm
Reply with quote

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
View user's profile Send private message
twissi

Active User


Joined: 01 Aug 2005
Posts: 105
Location: Somerset, NJ

PostPosted: Wed Jan 31, 2007 5:24 pm
Reply with quote

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
View user's profile Send private message
Sahoo

New User


Joined: 08 Jun 2006
Posts: 53

PostPosted: Thu Feb 01, 2007 8:11 am
Reply with quote

@ twissi

Thanks for your response. I am not using package. I am using only plan.

Sahoo
Back to top
View user's profile Send private message
twissi

Active User


Joined: 01 Aug 2005
Posts: 105
Location: Somerset, NJ

PostPosted: Mon Feb 05, 2007 3:12 pm
Reply with quote

Sahoo,

For your information, you can't BIND more than one program without using PACKAGEs!

Cheers, Twissi.
Back to top
View user's profile Send private message
mk_kumar315

New User


Joined: 21 Nov 2005
Posts: 10

PostPosted: Fri Nov 19, 2010 11:50 am
Reply with quote

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
View user's profile Send private message
nelson.pandian

Active User


Joined: 09 Apr 2008
Posts: 133
Location: Phoenix, AZ

PostPosted: Fri Nov 19, 2010 2:28 pm
Reply with quote

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
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 -> Mainframe Interview Questions

 


Similar Topics
Topic Forum Replies
No new posts Timestamp difference and its average ... DB2 11
No new posts Difference when accessing dataset in ... JCL & VSAM 7
No new posts What is the difference between Taskty... Compuware & Other Tools 2
No new posts Rebind issue - Package DB2 2
No new posts Difference between VALIDPROC and CHEC... DB2 3
Search our Forums:

Back to Top