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

if we display var1 then what will b displayed in below condition. 77 var1 pic s9(2) value -10. 77 var1 pic s9(2) value -11. " " " -12. " " " -13. -14 ... ... -19.

5687


can you please let me know if there is any walkins for COBOL/PLI/DB2/IMS/JCL in pune other than IBM and ITC infotech

1959


Explain how will you differentiate between an internal and an external sort, the pros and cons, internal sort syntax etc

823


1.Is it possible to move the data from 99.99 to 99v99? 2.What is the CICS-vsam Compilation process? 3.In My GDG 5 generation will be there GDG3 got an abend what will happen? 4.In my GDG first generation is +1 And I want to add the new generation what will happen previous generation? 5.How can you give the PIC clause below conditions A). s9 (reddy), B). s9 (5) occurs 5 times? 6.How override the proc from a particular step? and what is symbolic and override Procs?

5377


How do get the result of your program directly on your pc?

1883






Name the divisions, which are available in a cobol program?

685


What is the LINKAGE SECTION used in COBOL?

889


What do you understand by psb and acb?

663


What are declaratives and what are their uses in cobol?

714


What is a scope terminator give example?

657


For rewrite, why is it mandatory that file needs to be opened?

623


How to remove 2 duplicate records and copy only one using job control language?

753


When is inspect verb is used in cobol?

675


how do you reference the variable unblock file formats from cobol programs

748


i need a small 3d program using inline and outline.

1637