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 

Which programs should be Link Edited in this scenario ?

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


Joined: 31 Aug 2005
Posts: 51
Topics: 27

PostPosted: Tue Jan 24, 2006 8:32 am    Post subject: Which programs should be Link Edited in this scenario ? Reply with quote

Hi,
i have doubt that when should we link edit, is it necessary only for static calls ??
suppose proga calls progb (dynam)
probb calls progc (dynam)
progc calls progd (static)

& i make changes to progb & progd , which programs should i only compile,compile link edit ??
can someone pls tell me this

thanks
ganesh
Back to top
View user's profile Send private message
kolusu
Site Admin
Site Admin


Joined: 26 Nov 2002
Posts: 12378
Topics: 75
Location: San Jose

PostPosted: Tue Jan 24, 2006 8:53 am    Post subject: Reply with quote

Gans79,

You need to get your basics clear first.

The compiler translates your COBOL program into language that the computer can process (object code). After the program has compiled cleanly (that is, there are no compilation errors), you are ready to link the object program just created to produce theexecutable load module.

Since you are making changes to Prog B and prog D. The following are the steps you need to follow.
Code:

1. Compile and link edit program D
2. Compile and link edit program C
3. Compile and link edit program B


You strictly need to follow sequence 1 and 2.

After the completion of step2, check the load module of prog C and check if it has indeed the latest timestamp from load module D.

Hope this helps...

Cheers

Kolusu
_________________
Kolusu
www.linkedin.com/in/kolusu
Back to top
View user's profile Send private message Send e-mail Visit poster's website
German Castillo
Beginner


Joined: 23 Dec 2005
Posts: 83
Topics: 2
Location: Caracas, Venezuela

PostPosted: Tue Jan 24, 2006 11:01 am    Post subject: Reply with quote

Hi gans79

Use this 'rules of thumb'

a) Recompile everything which has suffered modifications, from the 'lower level' all the way up

b) Re-linkedit eveyrhing you have compiled in step -a)-, plus everithing they are statically linked to, again, all the way from the 'botton level'--> up

c) If you need new timestamps in your load modules just recompile/relinkedit everything, and yes... all the way from the bottom up, but this is not needed
_________________
Best wishes,

German Castillo
Back to top
View user's profile Send private message
gans79
Beginner


Joined: 31 Aug 2005
Posts: 51
Topics: 27

PostPosted: Tue Jan 24, 2006 9:23 pm    Post subject: Reply with quote

hi,
thanks for the explanation guys, i was in the impression that link edit was
necessary only for statically called programs

thanks
ganesh
Back to top
View user's profile Send private message
semigeezer
Supermod


Joined: 03 Jan 2003
Posts: 1014
Topics: 13
Location: Atlantis

PostPosted: Tue Jan 24, 2006 9:49 pm    Post subject: Reply with quote

ganesh, Your impression is partially correct. You need to recompile the changed programs, and relink the modules that contain those programs. You do not need to recompile the programs that call the changed programs unless the parameters have changed, and you do not need to recompile the other programs in the load module that contains your changed programs. You do not need to recompile progc, but you do need to relink the load module progc because it contains the changed (and recompiled) progd. Similarly, you need to both compile and link progb because it is a standalone load module.

In a production environment, this should all be handled by a SCM (source confuguration manager) like SCLM which builds your system for you. These will understand the dependencies automatically and build only what is needed (similar to the make command in Windows or Unix).
Back to top
View user's profile Send private message Visit poster's website
Display posts from previous:   
Post new topic   Reply to topic   printer-friendly view    MVSFORUMS.com Forum Index -> Application Programming 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