What are differences between Static Call and Dynamic Call?

Answer Posted / sivakumar sekhrannair

If a program is called statically then its load module is
combined with mainprograms load module.
In dynamically called program the load module is
independent of the main program's load module.

Why it's happening?
The answer is
In statically called program the program name is given
inside the procedure division as a value not a variable.
The value given inside the procedure division will be
resolved and changed to load module language during
compilation.

But for dynamically called program, the program name is
given as a variable. The value passed to the variable
through file or through working storage section is resloved
only during runtime.
So when we compile the dynamically called subprogram
1)First we compile the subprogram that creates its own load
module.
2)then we compile the main program. During main program
compilation it subrogram name will be taken as a value of a
variable. so the subprogram load module will not be
combined with the main program

3) when we run the main program(which calls the dynmically
called subprogram) the main program treates the subprogram
name as a value and the subprogram is called now.


if anyone have any corrections please let me know in
shivanskn@yahoo.co.in

Is This Answer Correct ?    6 Yes 1 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

How do you code cobol to access a parameter that has been defined in jcl? And do you code the parm parameter on the exec line in jcl?

936


What is cobol?

946


What is the usage of comp fields in cobol?

869


How to read the 2nd last record of a VSAM file? (The file size is huge and we don't know the key)

2994


What is a SSRANGE and NOSSRANGE?

1111


Differentiate between structured cobol programming and object-oriented cobol programming.

836


How do you reference the fixed block file formats from cobol programs

911


What is the default value(s) for an initialize and what keyword allows for an override of the default?

953


Write some characteristics of cobol as means of business language.

836


How to print 10 to 1 if the input have only 10 digit number?

1023


Why is it necessary that file needs to be opened in I-O mode for REWRITE?

985


Explain how you can characterize tables in cobol?

818


What is report-item in COBOL?

894


how can we apply for HSBC exam(Mainframe) in India??? i went to their site and was told to submit my CV ,. etc..( totally confusing...)

2137


) How do u handle errors in BMS macro?

1618