Handling function returns between C++ and COBOL

In COBOL, values can be returned to COBOL programs as COBOL returning variables from C++ functions using standard C++ function returns. This is the recommended approach for passing modified values back from a C++ function to a COBOL procedure.

Note: In the declarations that follow, COBOL refers to Enterprise COBOL for z/OS, COBOL for OS/390 & VM, and COBOL for MVS & VM.

The following examples illustrate how to declare data types for using function returns in C++ to COBOL ILC applications.