View previous topic :: View next topic
|
Author |
Message |
finnygeorge
New User
Joined: 07 Aug 2006 Posts: 6
|
|
|
|
Hi
I need your help........... I have only one program which contain some SQL statements.... Is there any need for package in this condition??? Where do we store packages???? My question is I have only one DBRM then is there any need for package??? I hope you got a clear concept of my question?? |
|
Back to top |
|
|
ansafmmm
New User
Joined: 21 Nov 2006 Posts: 2 Location: India
|
|
|
|
Dear Finny,
It is necessary to build a package in the latest versions. A package is a bind of one or more DBRMs. Even if there is only one program/DBRM, it is necessary to bind and form a Package. |
|
Back to top |
|
|
Arun Raj
Moderator
Joined: 17 Oct 2006 Posts: 2481 Location: @my desk
|
|
|
|
Hi
You have to create a package for each DBRM.If you have one DBRM then you should bind it to a package.
As per DB2 UDB for zOS V8-Appln Pgming & SQL Guide
Quote: |
Input to binding a package is a single DBRM only. |
Thanks
Arun |
|
Back to top |
|
|
ansafmmm
New User
Joined: 21 Nov 2006 Posts: 2 Location: India
|
|
|
|
Yes Arun,
You are right about package defenition.
Sorry for it, a package is only for a single DBRM.
Thankyou
ANSAF |
|
Back to top |
|
|
kgumraj
Active User
Joined: 01 May 2006 Posts: 151 Location: Hyderabad
|
|
|
|
Hi,
Package is a concept, if we have 3 calling programs, if we change one program there is no need to compile all the 3 programs.
In your case, There is only one DB2-program so there is no need for the package. Plan will serve the purpose.
But to see in future prospects it is better to bind using package. |
|
Back to top |
|
|
humpty Warnings : 1 New User
Joined: 01 May 2005 Posts: 23
|
|
|
|
Dear,
let us talk about the basics first.
DBRM - it contains all the embedded SQL statements and the consistency token which is nothing but a timestamp.
BIND - it is simply a compiler for SQL statements.
PACKAGE - it contains access path and consists only of single DBRM.
PLAN - plan consists of more than one DBRM or more than one PACKAGE or a combination of DBRM and a package. It also contains access path, however, it is executable. This is the only difference between plan and package.
every DBRM needs to be bind either into a package or a plan. but since plan is the only executable format, therefore, if you bind DBRM into package. it has to be ultimately transformed into plan.
it is always advisable to bind DBRM into packages and in turn to plan.
lets take an example:
suppose you have 100 programs. if you bind these 100 pgms into single PLAN, and if there is change in any pgm, then you need to BIND the 100 pgms again into PLAN.
but if you make 100 packages for the 100 pgms and if there is any change in 1 pgm. then only 1 package needs to be bind again instead of 100 binds as in the upper case.
since in your case it is only 1 pgm, you may opt for plan. but it is advisable to opt for package and in turn for plan.
i hope this clears the scenario.
|
|
Back to top |
|
|
|