Page 1 of 1

Static calls and recompilation

PostPosted: Fri Mar 23, 2012 5:51 pm
by sinmani
A –>B->C->D->E all are calling each other with static calls.If we have changes in program C. Whats else needs to be done to run the software?
which programs need to be recompiled??

Re: Static calls and recompilation

PostPosted: Fri Mar 23, 2012 5:52 pm
by BillyBoyo
You only need to recompile what has changed. Program C. The linker/binder takes care of the rest.

Re: Static calls and recompilation

PostPosted: Fri Mar 23, 2012 6:31 pm
by Robert Sample
You would HAVE to recompile program C. Depending upon what changed, you may have to recompile A, B, D, and / or E. In all cases, however, you would have to redo the linkage editor / binder step to rebuild the load module using the new version of program C -- if that is how the load module was built in the first place. Note that a static or dynamic COBOL call does not necessarily mean the load module includes the subroutine (which depends upon how the linkage edit / binding was done). If A, B, C, D, and E are separate load modules, then recompiling program C would be sufficient. If they are not separate load modules, then whichever load modules included program C would have to be relinked (rebound).

Re: Static calls and recompilation

PostPosted: Fri Mar 23, 2012 8:44 pm
by sinmani
@Robert thanks for your reply.
By what u have said you mean it is not necessary that subroutine be a part of the load even in case of static calls.
On the other hand what I have read is that in case of static calls the subroutines are a part of the load and are hence faster. This is their advantage.

While in case of dynamic calls the whether subroutine is loaded or not is decided at run time. Hence they are slower but use less memory.

Re: Static calls and recompilation

PostPosted: Fri Mar 23, 2012 11:42 pm
by Robert Sample
COBOL separates static / dynamic, remember. A CALL 'program' can be static or dynamic, depending upon the compiler options. A CALL variable-name will be dynamic. But I have seen programs with dynamic COBOL CALL statements where the subprogram is linked into the load module.

Dynamic calls allow for smaller overall load modules since each calling program does not need a copy of every subprogram it calls -- but the overall size difference depends upon the system and how many programs call how many subprograms. If program A calls program B calls program C, and these 3 programs aren't used anywhere else, then the load module size compiling A, B, C into one module may well be smaller than having 3 load modules. Plus there is run-time overhead of fetching each load module into memory.

The big advantage to dynamic calls is that each subprogram can be maintained without having to recompile a batch of calling programs for every change made to the subprogram. Talking about "faster" or "less memory" is completely missing the point -- the savings in people time in not having to track which modules need recompiling just because subprogram X changed vastly outweighs execution considerations.

Re: Static calls and recompilation

PostPosted: Wed Apr 04, 2012 10:11 am
by sinmani
Thanks Robert, This is very informative :)

Re: Static calls and recompilation

PostPosted: Sun Apr 22, 2012 12:43 pm
by Deepak kumar25
DYNAMIC CALL IS BETTER BEACUSE YOU DO NOT NEED TO RELINK YOUR APPLICATION IF YOU CHANGE SOMETHING IN YOUR SUBROUTINE,
ONLY SUBROUTINE DLL NEEDS TO BE RELINKED
THE BENIFITS OF DYNAMIC CALLED SUBROUTINE IS THAT U CAN FREE MEMORY THAT A DYNAMICALLY CALLED SUBROUTINE BY CANCELING SUBROUTINE.

Re: Static calls and recompilation

PostPosted: Sun Apr 22, 2012 12:48 pm
by BillyBoyo
Firstly, please don't type in all caps, it is considered to be "shouting" and rude.

It is not that common for a DLL to be produced on a Mainframe,

Is that the only benefit you can come up with? Any downside?

What are you trying to do with these resurrections of old topics?

Re: Static calls and recompilation

PostPosted: Sun Apr 22, 2012 1:27 pm
by Deepak kumar25
ok billy , i will always type in small,
yar these are not old topics, these are alive.




deepak kumar
mainframe trainer(applied labs)

Re: Static calls and recompilation

PostPosted: Sun Apr 22, 2012 2:28 pm
by BillyBoyo
Re: Static calls and recompilation

Postby sinmani » Wed Apr 04, 2012 4:41 am
Thanks Robert, This is very informative :)


sinmani started the topic, and seems to feel the information provided satisfies their need.

So, why resurrect it?

Why resurrect it with such pointless rubbish?