Passing and Sharing Data Between Programs
There are many ways to pass or share data between ILE COBOL programs:
- Data can be declared as GLOBAL so that it can be used by nested programs.
- Data can be returned to a calling program using the RETURNING phrase of
the CALL statement.
- Data can be passed to a called program BY REFERENCE, BY VALUE, or BY CONTENT
when the CALL statement is run.
- Data that is declared as EXTERNAL can be shared by separately compiled
programs. EXTERNAL data can also be shared between nested ILE COBOL programs
within a module object.
- Files that are declared as EXTERNAL can be shared by separately compiled
programs. EXTERNAL files can also be shared between nested ILE COBOL programs
within a module object.
- Pointers can be used when you want to pass and receive addresses of dynamically-located
data items.
- Data can be passed using Data Areas.
(C) Copyright IBM Corporation 1992, 2006. All Rights Reserved.