ILE C/C++ Programmer's Guide

Mixing Recursive and Non-Recursive Calls

Extra care is required when one language uses recursive calls and another uses non-recursive calls. For example:

Do not use an ILE C++ procedure to call an ILE COBOL procedure that might call another, already active, ILE COBOL procedure.

Figure 233 illustrates that such a call does not work. Assume that procedure A is an ILE C++ procedure, procedures B and C are ILE COBOL procedures, and that these procedures are in the same program. If procedure A calls procedure B, then procedure B can call neither procedure A nor B. If procedure B returns control to procedure A, and if procedure A then calls procedure C, procedure C can call procedure B but not procedure A or C.

Figure 233. ILE C++ Procedures Cannot Call Active ILE COBOL Procedures



ileprcll

Similarly, you cannot call OPM COBOL programs that are already on the call stack.


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