COBOL - Making both static and dynamic calls



Desenvolvido por DORNELLES Carlos Alberto - Analista de Sistemas - Brasília DF. - cad_cobol@hotmail.com

COBOL - Structuring complex applications - Making both static and dynamic calls

Enterprise COBOL for z/OS, Version 4.2, Programming Guide


You can use both static and dynamic CALL statements in the same program if you compile the program with the NODYNAM compiler option.

In this case, with the CALL literal statement, the called subprogram will be link-edited with the main program into one load module.
The CALL identifier statement results in the dynamic invocation of a separate load module.

When a dynamic CALL statement and a static CALL statement to the same subprogram are issued within one program, a second copy of the subprogram is loaded into storage.
Because this arrangement does not guarantee that the subprogram will be left in its last-used state, results can be unpredictable.


© Copyright IBM Corp.