MVSFORUMS.com Forum Index MVSFORUMS.com
A Community of and for MVS Professionals
 
 FAQFAQ   SearchSearch   Quick Manuals   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Binding subprograms and main programs

 
Post new topic   Reply to topic   printer-friendly view    MVSFORUMS.com Forum Index -> Database
View previous topic :: View next topic  
Author Message
ksandy
Beginner


Joined: 27 Mar 2003
Posts: 18
Topics: 11

PostPosted: Thu Jan 08, 2004 6:31 am    Post subject: Binding subprograms and main programs Reply with quote

Hi

Can anybody explain about BIND process when it comes to a Db2 program calling another DB2 programs

1. Does it make any difference if main program & subprogram ..DBRMs are associated with same or different collection id

2. If we incorporate changes in only main program/sub-program , what should be flow for bind process

3. if we have to change a subprogram called by 3-4 different main program then what can be optimised bind process in that case

Thanks
Ksandy
Back to top
View user's profile Send private message
CZerfas
Intermediate


Joined: 31 Jan 2003
Posts: 211
Topics: 8

PostPosted: Thu Jan 08, 2004 6:37 am    Post subject: Reply with quote

The bind process comes in two flavours: PLAN oriented, which stands for a complete transaction, and PACKAGE oriented, which stands for one module (compile unit). Advisable is the usage of packages; with this, (3.) is obsolete.

To (1.): It makes no difference, as long as all used collection ids are listed in the DB2 plan executed at runtime.

To (2.): I didn' get your question.

regards
Christian
Back to top
View user's profile Send private message
ksandy
Beginner


Joined: 27 Mar 2003
Posts: 18
Topics: 11

PostPosted: Tue Jan 13, 2004 1:07 am    Post subject: Reply with quote

Thanks Christin

2. Suppose , I have main pgm M1 calling 2 subprograms s1, s2 .

Now if s1 changes , do I have to compile - bind M1 again or just bind will suffice.

in reverse scenario if main program M1 changes... M1 should be compiled & Bind , but do we have to bind s1 & s2 also .

Can someone explain in detail about this both in PLAN and Collection-id scenario

Ksandy
Back to top
View user's profile Send private message
CZerfas
Intermediate


Joined: 31 Jan 2003
Posts: 211
Topics: 8

PostPosted: Tue Jan 13, 2004 9:44 am    Post subject: Reply with quote

If your Bind statement is "BIND PACKAGE ...", you are working module oriented. In that case no binding of unchanged modules is needed.

If your Bind statement is "BIND PLAN ... MEMBER ... ", you statically bind all DBRMs belonging to a transaction into one PLAN, comparable to a statically linked bunch of load modules. In that case you have to issue the bind statement if any of the listed DBRMs has changed.

Regards
Christian
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic   printer-friendly view    MVSFORUMS.com Forum Index -> Database All times are GMT - 5 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


MVSFORUMS
Powered by phpBB © 2001, 2005 phpBB Group