You can make interlanguage calls and pass _DecimalT-class arguments to ILE RPG, ILE COBOL, and ILE C programs.
The following figure provides an ILE COBOL example.
The C++ program is: // This program calls an ILE COBOL program // and passes a bcd object. #include <iostream.h> #include <bcd.h> extern "COBOL" void CBLPGM(_DecimalT<9,7>); int main(void) { _DecimalT<9,7> arg=__D("12.1234567"); // Call an ILE COBOL/400 program and pass a bcd object // to it. CBLPGM(arg); cout <<"The COBOL program was called and passed a bcd object"<<endl; } The ILE COBOL program is:
|
The output is:
+--------------------------------------------------------------------------------+
|**** BCD OBJECT RECEIVED IS: 12.1234567 | |
The COBOL program was called and passed a bcd object | +--------------------------------------------------------------------------------+
(C) Copyright IBM Corporation 1992, 2005. All Rights Reserved.