Language selection considerations
You can directly use APIs, other than service-program-based APIs, with all the languages that are available with the IBM® i operating system.
ILE APIs that are implemented as service programs (*SRVPGM) can be directly accessed only by ILE languages. For non-ILE languages, the Call Service Program Procedure (QZRUCLSP) API is available to indirectly access service-program-based APIs. In some cases, an ILE API also provides a program (*PGM) interface so that non-ILE languages can access the function.
Some APIs also require that particular data types and particular parameter passing conventions be used. The following table shows the languages that are available with the IBM i operating system and the data types that they provide.
| Language | Pointers | Binary 2 | Binary 4 | Character | Zoned decimal | Packed decimal | Floating point | Structures | Single array | Exception handling |
|---|---|---|---|---|---|---|---|---|---|---|
| BASIC (PRPQ 5799-FPK) | X | X | X | X 1 | X 1 | X | X | X | ||
| ILE C | X | X | X | X | X 6 | X | X | X | X | |
| VisualAge® C++ for IBM i | X | X | X | X | X 7 | X | X | X | X | |
| CL | X | X | X | X | X | X | X 2 | X | ||
| ILE CL | X | X | X | X | X | X | X 2 | X | ||
| COBOL | X | X | X | X | X | X | X | X | X 3 | |
| ILE COBOL | X | X | X | X | X | X | X | X | X | X 3 |
| MI | X | X | X | X | X | X | X | X | X | X |
| Pascal (PRPQ 5799-FRJ) | X | X | X | X | X 4 | X 4 | X | X | X | X |
| PL/I (PRPQ 5799-FPJ) | X | X | X | X | X | X | X | X | X | X |
| REXX | X | X 2 | X 2 | X | ||||||
| RPG | X | X | X | X | X | X | X | X 5 | ||
| ILE RPG | X | X | X | X | X | X | X | X | X | X 5 |
Notes:
|
||||||||||
The following table shows the languages that are available with the IBM i operating system and the parameter support that they provide. See the reference information for the specific programming language that you plan to use.
| Language | Function return values 1 | Pass by reference | Pass by value |
|---|---|---|---|
| BASIC | X | ||
| ILE C | X | X | X |
| VisualAge C++ for IBM i | X | X | X |
| CL | X | ||
| ILE CL | X2 | X | X2 |
| COBOL | X | 3 | |
| ILE COBOL | X | X | X |
| MI | X | X | |
| Pascal | X | ||
| PL/I | X | ||
| REXX | X | ||
| RPG | X | ||
| ILE RPG | X | X | X |
Notes:
|
|||