ILE C/C++ Programmer's Guide

Using a Linkage Specification in a C++ Dynamic Program Call

You can call OPM, ILE, or EPM programs from a C++ program. OPM, ILE or EPM programs can also call a C++ program.


C++ language only
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.

Valid String Literals

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:

 "OS" 
OS linkage call

 "OS nowiden" 
OS linkage call without widened parameters. See Specifying that a Function Has External (OS) Linkage for details.

Linkage Specification


C++ language only
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.


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