Calling alternate entry points
Static calls to alternate entry points work without restriction.
Dynamic calls to alternate entry points require the following elements:
- Either explicitly
specified
NAME
orALIAS
binder (linkage-editor) control statements, or use of theNAME
compiler option which generates them automatically. - An intervening
CANCEL
for any dynamic call to the same module at a different entry point.CANCEL
causes the program to be invoked in initial state when it is called at a new entry point.
You can specify another entry point at which a
program will begin running by using the ENTRY
label
in the called program. However, this method is not recommended in
a structured program.
Examples: static and dynamic CALL statements
related references
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
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