Page 1 of 1

Dynamic/static call

PostPosted: Sat Jul 10, 2010 12:17 am
by maxcc
How can we find out in a program if it is a dynamic/static call apart from dynam/no dynam option?

Re: Dynamic/static call

PostPosted: Sun Jul 11, 2010 8:34 pm
by Robert Sample
The best way is to look at the load module using AMBLIST or whatever similar tool your site uses to see if the called program is linked into the load module.

Re: Dynamic/static call

PostPosted: Sun Jul 11, 2010 11:49 pm
by nm992
The static form of the CALL statement specifies the name of the subroutine as a literal; e.g., it is in quotes.



The dynamic form of the CALL statement specifies the name of the subroutine using a variable; the variable contains the name of the subroutine to be invoked


Plz revert if you need more info.

Re: Dynamic/static call

PostPosted: Mon Jul 12, 2010 12:55 am
by dick scherrer
Hello,

While that is somewhat true, the best way to see how a module is invoked is using AMBLIST as Robert suggested. . .

Re: Dynamic/static call

PostPosted: Mon Jul 12, 2010 3:37 am
by Robert Sample
The static form of the CALL statement specifies the name of the subroutine as a literal; e.g., it is in quotes.
Your statement is not true all the time. From the COBOL Programming Guide manual:
2.4.20 DYNAM

Use DYNAM to cause nonnested, separately compiled programs invoked through the CALL literal statement to be loaded for CALL, and deleted for CANCEL, dynamically at run time. (CALL identifier statements always result in a runtime load of the target program and are not affected by this option.)
So a statement in the form of CALL 'ABCDEFGH' may be static OR dynamic, depending upon the compiler options used.

Re: Dynamic/static call

PostPosted: Mon Jul 19, 2010 6:50 pm
by maxcc
Thanks for the replies.