|
|
| Author |
Message |
syntelraj Warnings : 1 New User
Joined: 28 Jul 2006 Posts: 10 Location: Pune
|
|
|
|
Hi Guys,
Can any one explain the following scenario falls under STATIC or DYNAMIC linking?
Calling program has the below statment and at the time of linking NODYNAM option was used.
CALL WS-SUB-PROGRAM USING WS-VAR1
I just want to know what happens in this case.
Thank you very much for your time. |
|
| Back to top |
|
 |
References
|
Posted: Thu Aug 03, 2006 2:50 pm Post subject: Re: Query on DYNAMIC and STATIC Linking in COBOL |
 |
|
|
 |
shreevamsi
Senior Member
Joined: 23 Feb 2006 Posts: 320 Location: Hyderabad,India
|
|
|
|
When a program that is compiled using the NODYNAM and NODLL compiler options, a static call occurs.
~Vamsi |
|
| Back to top |
|
 |
syntelraj Warnings : 1 New User
Joined: 28 Jul 2006 Posts: 10 Location: Pune
|
|
|
|
Thanks for your response Vamsi.
In this case what will be the value in the variable WS-SUB-PROGRAM?
I think there will be no memory is allocated to this variable at the compile time.
Do you mean the whatever value we initialze in the working storage the same will be used??
If we don't assign any value to WS-SUB-PROGRAM, does it cause any compilation ( I actually mean link) error?
Do you mean only during linking time the CALL type will be decided?
Even though all the questions similar, I want to make each and every point clear.
Could some please provide answers for each question.
Thank you very much for your time & patience. |
|
| Back to top |
|
 |
DavidatK
Senior Member
Joined: 22 Nov 2005 Posts: 715 Location: Troy, Michigan USA
|
|
|
|
Hi syntelraj,
The DYNAM/ NODYNAM compiler option only affects subroutine call in this format:
CALL 'MYSUB' USING ARG1.
If the NODYNAM option has been used, then the call is STATIC, If the DYNAM option was used the call is DYNAMIC.
Subroutine calls in this format:
CALL WS-SUB-PROGRAM USING WS-VAR1.
Are ALWAYS DYNAMIC calls.
Dave |
|
| Back to top |
|
 |
syntelraj Warnings : 1 New User
Joined: 28 Jul 2006 Posts: 10 Location: Pune
|
|
|
|
| Thank you very much Dave for the clarification. |
|
| Back to top |
|
 |
|
|