What are differences between Static Call and Dynamic Call?

Answers were Sorted based on User's Feedback



What are differences between Static Call and Dynamic Call?..

Answer / ananta bajpai

1.Static call is that in which programe is directly called
by its name. where as Dynamic call is that in which
programe called by a variable name.e.g programe name is
moved into a variable and that variable is used in call
statemant like
working-storage section.
01 var pic x(4) value 'call1'.
.
.
procedure division.
call var.......
Note ; programe name must be given in working-storage
section.
2.static call linked at complie time where as dynamic call
at run time
3.in static call called programe never come into initiall
state after one time run.There is alway requried to complie
every time for new task .Instead of this dyanmic call call
programe always in initiall state

Is This Answer Correct ?    12 Yes 3 No

What are differences between Static Call and Dynamic Call?..

Answer / 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

What are differences between Static Call and Dynamic Call?..

Answer / guest

Calling With in the program is called static call.
Calling out side the program (other program) is called
Dynamic call.
Main and sub-programs are stored in single load module
in static call.Main and sub-programs are stored in
different load module in synamic call.
If u are made any change in static call uging program
u need to re run all the programes or load module. In
dynamic call Just u can run in which program u r made
changes or in which load module.

Is This Answer Correct ?    13 Yes 9 No

What are differences between Static Call and Dynamic Call?..

Answer / prince

Static call refers calling of the program in same
storage.Calling the program by its name. The program will be
calling using NODYNAM compiler option.In Static call
subprogram is linked at Compile time.In static call if we
want to edit the subprogram we need to compile both main
program and sub program. Static call calls one
program.Static program takes less time to execute. For
static call both calling and called programs will be having
one load module and they share only one load module.

Dyanamic call refers calling the program may be in differnt
storage.Calling the subprogram by a variable name. The
program is Calling using DYNAM option.In Dyanamic call
subprogram is linked at run time.The program must be in copy
library.In Dynamic call if we want to edit the subprogram we
need to compile only sub program.Dynamic call calls many
program. If the subprogram involves continuous change
Dynamic call is used.But for dynamic calling both calling
and called program have their own seaperate load modules.

Is This Answer Correct ?    3 Yes 0 No

What are differences between Static Call and Dynamic Call?..

Answer / ravi

Static call is compiled and link edited to seperate load
module of calling program.
Dynamic call is compiled and link edited to different load
module of calling program

Is This Answer Correct ?    3 Yes 1 No

What are differences between Static Call and Dynamic Call?..

Answer / rajesh

There are lot of differences. Some of them are

1.If you call the subprogram by hardcoding it into the
program it is known as static program whereas calling the
subprogram by means of a working storage variable is known
as dynamic call.

Static call: CALL ''SUBPRG1''
Dynamic call: CALL WS-SPRGNAME

2.If you want to execute the modules with static call, the
load module will collectively contain the loadlibs of all
the modules involved.(Both calling and the called).

In case of Dynamic the loadlib contains the loadmodule of
the calling module alone.

3.If u want to call programs depending on some condition
(ie not every time with calling pogram must use Dynamic
call).If subprograms need to be called for everytime with
callling programs must use static call.

4.The module involving static call takes more time in
compilation process whereas dynamic takes more time to run.

These are some of the major differences.Please let me know
if i m wrong anywhere.

Is This Answer Correct ?    3 Yes 1 No

What are differences between Static Call and Dynamic Call?..

Answer / iqru

Static Call - 1) Identified by CALL Literal i.e CALL 'PGM1'
USING... 2)Compiler option must be specified as 'NODYNAM'.
3)If the subprogram i.e PGM1 undergoes any change, the main
and sub modules need to be recompiled. 4)submodules needs
to be link edited to the main module. 5) Size of the load
module will be large.

Dynamin Call - 1) Identified by CALL literal with the
module being passed through a variable. i.e CALL WS-PGM1.
2) Compiler option must be specified as 'DYNAMIC'
or 'DYNAM'. 3)If the subprogram which is being called
dynamically undergoes a change , the subprogram is alone
compiled enough to take effect of the changes. Compilation
of main module is not necessary. 4) submodules are picked
up from the load library when the program runs. 5) Size of
the load module will be less.

Is This Answer Correct ?    1 Yes 0 No

What are differences between Static Call and Dynamic Call?..

Answer / siri

STATIC CALL:-
------------
STATIC CALL IS IDENTIFIED BY A CALL IS
LITERAL..EX:-CALL'PGM1'....COMPILER OPTION IS NO DYNAM...ALL LITERAL CALLS ARE CONSIDER AS STATIC CALLS...OBJECT CALLS ARE LINKED BEFORE THE EXECUTION..STATIC CALL IS FAST..LOAD MODULE WILL BE LARGE....LESS FLEXIBLE...SUB PROGRAMS UNDERGOES TO CHANGE NEED TO RECOMPILE MAIN PRG ALSO..

DYNAMIC CALL:-
------------
IDENTIFIED BY A CALL IS VARIABLE...MOVE 'PGM1' TO WS-PGM
CALL 'WS-PGM'
COMPILER OPTION IS DYNAM...OBJECT CODS ARE LINKED DURING THE EXECUTION....SO PRG FIRST MOVE TO THE WORKING STORAGE VARIABLE AND NEST CALL THE WORKING STORAGE VARIABLE...PROCESS IS SLOW SO DYNAMIC CALL IS SLOW COMPARE TO STATIC CALL.....ITS NO NEED TO RECOMPILE THE MAIN PROGRAM
WHEN EVER THE SUB PROGRAM UNDER GOES TO CHANGE...THIS IS THE
MAIN ADVANTAGE IS IN DYNAMIC CALL....

Is This Answer Correct ?    1 Yes 0 No

What are differences between Static Call and Dynamic Call?..

Answer / minhaj.

Static Linking means calling the subprogram directly with
name for example.

call "subprogram name", call "ca100".
Calling the subprogram with out passing the parameters in
two subprogram.

Dynamic call:

Calling the subprogram with paramets.
call "cdate4" using w-date.

Is This Answer Correct ?    1 Yes 4 No

What are differences between Static Call and Dynamic Call?..

Answer / s jana

in static call only value will be pass to called module,but
in dynamic call called module returns value to calling
module.

Is This Answer Correct ?    1 Yes 14 No

Post New Answer

More COBOL Interview Questions

is it possible to pass an SQL query inside a jcl which is inside a cobol program?

5 Answers   CTS,


In COBOL CALL-CALLING,if a program A is calling 3 sub- programs, dynamically, then it is said sub-programs will always will always in Initial Mode. My question is : Do we need to code CANCEL or (IS INITIAL) for dynamically called sub-programs or it is the property of Dynamically called pgms so every time sub-pgms are called they will be in initial mode. ***This question is only Dynamic call****, Please reply. Thank you in advance.

4 Answers   Wipro,


How include time & date in the report generation in cobol programing?

2 Answers  


What is file status 92?

3 Answers  


hi friends,can any one post the ibm mainframe inteqview questions for 1year exp candidate,for itc infotech interview?. have any body attended for this in the past?...

1 Answers   ITC Infotech,






What is the difference between working storage copybook and linkage section copybook?

5 Answers   TCS,


what is index and how to use two tables using index?

1 Answers  


how to display comp3 variables reply soon ?

4 Answers   Patni,


How to Write the RESTART Logic Using COBOL?

4 Answers   GalaxE, L&T, Syntel, TCS,


What are the divisions in a cobol program? Which one is the mandatory division among them?

1 Answers  


I have the requirement to compare the two files and pick up the matching records. File 1. file2 23 32 32 13 34 15 35 36 36 35 43 Get the matching records from this 2 files to out file. how you will do this in cobol program?

15 Answers   ADP, Broadridge, CTS, HSBC, L&T, RBS, TCS,


How to declare if emp-name = AAAAA""BBB in working-storage section. After display emp-name should print like AAAAA""BB

6 Answers   Polaris,


Categories