How can we identify just by looking at the program whether the subprogram is called Statically or Dynamically? Except below one.
Calling the Literal value is Static call and Calling the Variable is a Dynamic Call. Does it holds good in all conditions??? (i.e. Irrespective of other compiler options in effect)
Is there any other way to identify the type of call just by looking at the program?
CALL identifier is always dynamic. CALL literal depends on compiler option.
Note, there is nothing special or different about a "main-program" or a "sub-proram" in COBOL. You can CALL an "main-program" it'll work just the same.
Joined: 06 Jun 2008 Posts: 8505 Location: Dubuque, Iowa, USA
Quote:
Is there any other way to identify the type of call just by looking at the program?
Not without looking at the compile options -- a CALL literal may be a static call in one program and dynamic in another program based upon the compile options.
Basically my question is, In-spite of DYNAM or NODYNAM in effect. The way program is called : Literal or Identifier, does any other compiler option or any other parameter has effect on way of calling a program.
Also I think if we examine the loads, we can determine whether it is statically called or dynamically called.
Nothing else than what has been mentioned already affects whether a program is statically or dynamically CALLed. You cannot tell by looking at the source, end of story.
If you have a loadmodule (or Program Object with V5 of Enterprise COBOL) of course you can determine the difference. The code generated is different for static than for dynamic.
There must be another question underneath this, you've been clearly answered so far but are still looking...