Page 1 of 1

Static and dynamic call.

Posted: Tue Feb 04, 2014 8:40 pm
by Angel
Hi,

Can we change the Static call to dynamic call and ice versa while executing the program? Your help is appreciated.

Re: Static and dynamic call.

Posted: Tue Feb 04, 2014 8:41 pm
by Robert Sample
No. The determination of static versus dynamic call is made at COMPILE time. At execution time, there is no way to change the call type.

Re: Static and dynamic call.

Posted: Tue Feb 04, 2014 8:54 pm
by zprogrammer
No not possible unless you compile the program dynamically each time.As Robert said it is not possible to change it during execution.

Re: Static and dynamic call.

Posted: Thu Feb 06, 2014 6:54 pm
by Angel
Thanks Robert and PB.

Re: Static and dynamic call.

Posted: Fri Feb 07, 2014 2:44 pm
by William Collins
Why would you want to? You'd suddenly start using a different loadmodule from a previous CALL, and not have the previous WORKING-STORAGE values.

Re: Static and dynamic call.

Posted: Wed Feb 12, 2014 4:17 am
by dick scherrer
What kind of situation might this support?

Re: Static and dynamic call.

Posted: Sat Feb 15, 2014 11:28 pm
by Angel
I'm trying to understand the concept actually. At times it's advisable to have the dynamic call and other its advisable to have static, that made to ask this question. Possibly the question did not make any practical sense but it does help me...

Re: Static and dynamic call.

Posted: Wed Feb 19, 2014 1:57 am
by dick scherrer
I do not believe i agree . . .

What IS advisable is to follow the standards of the organization where the code is being implemented. . .

Re: Static and dynamic call.

Posted: Tue Mar 11, 2014 3:49 pm
by Quasar Chunawala
There is no such thing as better option. As Dick says, you should follow your shop standards.

Say if you have a COBOL Date-validation module that gets called from a million other modules, you'd use a dynamic call. If the date-validation module in turn calls some Assembler routine, it can be statically link-edited into the Date Module.

Re: Static and dynamic call.

Posted: Fri Nov 14, 2014 4:58 pm
by Angel
I agree to your points, as I said I was just rying to understand the concept.

THanks for your replies.

PS. Logged in after very long.