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

What is the maximum size of a 01 level item in COBOL I? in COBOL II?

2 Answers   IBM, RBS,


Which of the following EDITind and PICTURE symbols is to be used if a minus(-) is to appear before the value if the value is -ve and a plus(+) is to appear before the value if the value is +ve? (a) + (b) - (c) + OR (d) It is not possible

7 Answers   TCS,


What should be the sorting order for SEARCH ALL?

5 Answers  


There is a production file which has millions of records in it.The program that uses it ends up with an SOC7 abend.It is sure that the abend is due to some invalid data in the file.Is there any way to debugg the SOC7 abend with out giving displays? I need the record which is cause for the abend.

8 Answers   Danske, iGate,


TYPES OF SORTINGS. which is more prefarable.

2 Answers   Syntel, TCS,






Sending data is aplhabetic size 7 (value 3000), I wantated this value to be stored in database, which is defined as s9(7)v9(2)comp-3.

2 Answers  


What is the difference between external and global variables in COBOL?

0 Answers   Winsol Solutions,


HELLO FRIENDS, THIS IS JANARDHAN.GADIRAJU, I FACED ONE INTERESTING QUESTION IN COBOL, THAT IS WHAT ARE THE VALUES WE CAN SEE IN HIGHVALUES AND LOWVALUES, CAN U PLEASE GIVE ME THE ANSWER

7 Answers   Patni,


how will u find out 3rd week's 2nd day using occurs ?

3 Answers   L&T,


01 a pic x(4) value 'abcd' 01 b pic 9(3) can we move from a to b.if possible what would be stored in b.

15 Answers   ACS,


What is Comm?

2 Answers   IBM, Kemper Corporation,


how to transfer the file from pc to mainframe??

4 Answers  


Categories