Calling alternate entry points
About this task
You can specify another entry point at which a program will begin running by using
the ENTRY label in the called program.
Static calls to alternate entry points work without restriction.
Dynamic calls to alternate entry points require either explicitly specified NAME and/or ALIAS binder (linkage-editor) control statements, or use of the NAME compiler option, which generates them automatically.
Dynamically calling a compile unit at more than one entry point, including the primary entry point will produce a unique instance of WORKING-STORAGE for each such entry, as if separate compile units were being called.
If you share one WORKING-STORAGE instance among several entry points without statically linking the compile unit with its caller, you must make it a DLL and use EXPORTALL to expose the secondary entry points, and call the compile unit using a DLL call rather than a dynamic call.
Dynamic call and procedure-pointer call to alternate entry points must be run under AMODE 31. These calls are not supported for programs compiled with LP(64).
Examples: static and dynamic CALL statements
NAME
CANCEL statement (Enterprise COBOL for z/OS® Language Reference)
ENTRY statement (Enterprise COBOL for z/OS Language Reference)
MVS Program Management: User's Guide and Reference