Give simple program example for Dynamic link and Dynamic call in COBOL?

Static Call In Cobol:

Is calling of a literal.

CALL 'ABC' USING ARGUMENTS

The call statement specifies the sub-routine called as a literal. i.e, within quotes 'ABC'.
In static calls, if ABC is modified and recompiled, then all the executables calling ABC should be relinked.

Dynamic Calls:

01 Sub-Routine pic x(8) value 'ABC'

CALL ABC USING ARGUMENTS

Dynamic calling invovles calling a sub-routine using a variable and the variable contains the sub-routine name.
here the complied code is loaded when needed and is not incorporated into the executable.

No comments:

Post a Comment

Please Provide your feedback here