ILE COBOL Language Reference

Nested Programs

A COBOL program may contain other COBOL programs. The contained (or nested) programs may themselves contain yet other programs. A contained program may be directly or indirectly contained within a program.

Figure 2 describes a program structure with directly and indirectly contained programs.

Figure 2. Nested Program Structure with Directly and Indirectly Contained Programs

Nested Program Structure with Directly and Indirectly Contained Programs

The same user-defined word may be used in different programs to define different objects. In a particular program, a reference to an object always refers to the object defined in that program.


[ Top of Page | Previous Page | Next Page | Table of Contents | Index ]