Using subprograms
Many applications consist of several separately compiled programs linked together. A run unit (the COBOL term that is synonymous with the Language Environment® term enclave) includes one or more object programs and can include object programs written in other Language Environment member languages.
Language Environment provides interlanguage support that lets your Enterprise COBOL programs call and be called by programs that meet the requirements of Language Environment.
Name prefix alert: Do not use program-names that start
with prefixes used by IBM® products.
If you use programs whose names start with such prefixes, CALL
statements
might resolve to IBM library
or compiler routines rather than to the intended program. For a list
of prefixes to avoid, see the related task about identifying a program.
Identifying a program
Ending and reentering main programs or subprograms
Transferring control to another program
Making recursive calls
Calling to and from object-oriented programs
Using procedure and function pointers
Making programs reentrant
Handling COBOL limitations with multithreading
Language Environment Writing ILC Communication Applications
Language Environment Programming Guide (Register conventions)