View previous topic :: View next topic |
Author |
Message |
uthaman Beginner
Joined: 09 Apr 2007 Posts: 14 Topics: 9
|
Posted: Fri Jul 06, 2007 9:07 am Post subject: Static Linking |
|
|
I have a question about statically linked programs. Here is the setup:
A100 --calls--> B100 --calls--> S100
--calls--> B200 --calls--> C100 --calls--> S100
All of the calls in this chain are static calls. If I make a change to S100 do I only need to recompile A100 inorder to update all the links? Or, do I need to recompile B100, B200 and C100?
If the latter is true... If I only recompile B100, then is B200-C100 call still pointing at an older version of S100??? That doesn't seem right...
Thanks! |
|
Back to top |
|
|
semigeezer Supermod
Joined: 03 Jan 2003 Posts: 1014 Topics: 13 Location: Atlantis
|
Posted: Fri Jul 06, 2007 12:29 pm Post subject: |
|
|
If these are separate programs, you need only recompile S100 and relink A100. At least that is true in the general case. COBOL seems to have its own terminology about those things and I don't use COBOL but in general, each external program is independent of the others. The only reason you would need to recompile the others is if (1) you change the parameters that must be passed to the module, or (2) the change involves a copybook that is shared by the other modules.
Think about what the compiler does for, say, B100. It generates code that calls S100, but unless the way it calls S100 changes or something in B100 actually changes, there should be no reason to recompile B100. To B100, S100 is a 'black box'. B100 neither knows nor cares what the compiled code for S100 does. |
|
Back to top |
|
|
Nic Clouston Advanced
Joined: 01 Feb 2007 Posts: 1075 Topics: 7 Location: At Home
|
Posted: Fri Jul 06, 2007 1:37 pm Post subject: |
|
|
I have not found a way to do a 'link only' under Changeman (maybe the way it is setup in our shop?) so we have to re-stage (compile & link) the MAIN module just to do the link. But otherwise it is as semigeezer says. _________________ Utility and Program control cards are NOT, repeat NOT, JCL. |
|
Back to top |
|
|
|
|