View previous topic :: View next topic |
Author |
Message |
gans79 Beginner
Joined: 31 Aug 2005 Posts: 51 Topics: 27
|
Posted: Tue Jan 24, 2006 8:32 am Post subject: Which programs should be Link Edited in this scenario ? |
|
|
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 |
|
 |
kolusu Site Admin

Joined: 26 Nov 2002 Posts: 12378 Topics: 75 Location: San Jose
|
Posted: Tue Jan 24, 2006 8:53 am Post subject: |
|
|
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 |
|
 |
German Castillo Beginner

Joined: 23 Dec 2005 Posts: 83 Topics: 2 Location: Caracas, Venezuela
|
Posted: Tue Jan 24, 2006 11:01 am Post subject: |
|
|
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 |
|
 |
gans79 Beginner
Joined: 31 Aug 2005 Posts: 51 Topics: 27
|
Posted: Tue Jan 24, 2006 9:23 pm Post subject: |
|
|
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 |
|
 |
semigeezer Supermod
Joined: 03 Jan 2003 Posts: 1014 Topics: 13 Location: Atlantis
|
Posted: Tue Jan 24, 2006 9:49 pm Post subject: |
|
|
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 |
|
 |
|
|