Home > Software > Mainframe > Cobol
Interview Questions   Tutorials   Discussions   Programs   

Cobol - What are differences between Static Call and Dynamic Call?




441
views
asked mar August 3, 2014 01:02 AM  

What are differences between Static Call and Dynamic Call?


           

2 Answers



 
answered By Mswami   0  
Few other differences:

Sl #

STATIC Call

DYNAMIC Call

5

Size of load module will be large

Size of load module will be less.

6

Fast

Slow compared to Static call.

7

Less flexible.

More flexible.

8

Sub-program will not be in initial stage the next time it is called unless you explicitly use INITIAL or you do a CANCEL after each call.

Program will be in initial state every time it is called.

flag   
   add comment

 
answered By Mswami   0  

Sl #

STATIC Call

DYNAMIC Call

1

Identified by Call literal.

Ex: CALL ‘PGM1’.

Identified by Call variable and the variable should be populated at run time.

01 WS-PGM PIC X(08).

Move ‘PGM1’ to WS-PGM

CALL WS-PGM

2

Default Compiler option is NODYNAM and so all the literal calls are considered as static calls. 

If you want convert the literal calls into DYNAMIC, the program should be compiled with DYNAM option.

By default, call variables and any un-resolved calls are considered as dynamic.

3.

If the subprogram undergoes change, sub program and main program need to be recompiled.

If the subprogram undergoes change, recompilation of subprogram is enough.

4

Sub modules are link edited with main module.

Sub modules are picked up during run time from the load library.

flag   
   add comment

Your answer

Join with account you already have

FF

Preview


Ready to start your tutorial with us? That's great! Send us an email and we will get back to you as soon as possible!

Alert