Transferring control to another program

You can use several different methods to transfer control to another program: static calls, dynamic calls, calls to nested programs, and calls to dynamic link libraries (DLLs).

In addition to making calls between Enterprise COBOL programs, you can also make static and dynamic calls between Enterprise COBOL and programs compiled with older compilers in all environments including CICS®.

For restrictions about making calls with older levels of programs, see Interoperability with older levels of IBM COBOL programs in the Enterprise COBOL for z/OS Migration Guide.

Calling nested programs lets you create applications using structured programming techniques. You can use nested programs in place of PERFORM procedures to prevent unintentional modification of data items. Call nested programs using either the CALL literal or CALL identifier statement.

Calls to dynamic link libraries (DLLs) are an alternative to COBOL dynamic CALL, and are well suited to object-oriented COBOL applications, z/OS® UNIX programs, and applications that interoperate with C/C++.

Under z/OS, linking two program objects together results logically in a single program with a primary entry point and an alternate entry point, each with its own name. Each name by which a subprogram is to be dynamically called must be known to the system. You must specify each such name in binder (linkage-editor) control statements as either a NAME or an ALIAS of the program object that contains the subprogram.

Related references  
Enterprise COBOL for z/OS Migration Guide
(Interoperability with older levels of IBM® COBOL programs)