You can call OPM, ILE, or EPM programs from a C++ program. OPM, ILE or EPM programs can also call a C++ program.
C++ provides a linkage specification to enable dynamic program calls and
sharing of data between them. For a syntax diagram and additional
information, see WebSphere Development Studio: ILE
C/C++ Language Reference.
The "string-literal" is used to specify the linkage associated with a particular function. The string literals used in linkage specifications are case-insensitive. The valid string literals for the linkage specification to call programs are:
If you want a C++ program to call an ILE, OPM, or EPM program
(*PGM), use the extern "OS" linkage specification in
your C++ source to tell the compiler that the called program is an external
program, not a bound ILE procedure. For example, if you want a C++
program to call an OPM COBOL program (*PGM) this extern
"OS" linkage specification in your C++ source tells the compiler that
COBOL_PGM is an external program, not a bound ILE procedure.
extern "OS" void COBOL_PGM(void);
If you want an ILE, OPM or EPM program to call a C++ program, use the ILE, OPM, or EPM language-specific call statement.
(C) Copyright IBM Corporation 1992, 2005. All Rights Reserved.