Language selection considerations

You can use APIs with all the languages available on iSeries™ business computing systems, except for the ILE APIs.

ILE APIs that are implemented as service programs (*SRVPGM) can be accessed only by ILE languages. In some cases, a program (*PGM) interface is provided 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 available on the iSeries system and the data types that they provide.

Language selection considerations -- data types

Language 1 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 2 X 2 X X X
ILE C X X X X X 8 X X X X
VisualAge® C++ for i5/OS™ X X X X X 9 X X X X
CL X X X X X 3 X 3 X
ILE CL X 4 X X X X X 3 X 3 X
COBOL X X X X X X X X X 5
ILE COBOL X X X X X X X X X X 5
MI X X X X X X X X X X
Pascal (PRPQ 5799-FRJ) X X X X X 6 X 6 X X X X
PL/I (PRPQ 5799-FPJ) X X X X X X X X X X
REXX X X 3 X 3 X
RPG X X X X X X X X 7
ILE RPG X X X X X X X X X X 7
Notes:
  1. You cannot develop Cross System Product (CSP) programs on an iSeries system. You can, however, develop CSP programs on a System/370™ system and run them on your iSeries.
  2. Refer to the CNVRT$ intrinsic function.
  3. There is no direct support, but you can use the substring capability to simulate structures and arrays.
  4. There is no direct support, but pointers passed to a CL program are preserved.
  5. COBOL and ILE COBOL programs cannot monitor for specific messages, but these programs can define an error handler to run when a program ends because of an error.
  6. There is no direct support, but you can use extended program model (EPM) conversion routines to convert to and from zoned and packed decimal.
  7. RPG programs cannot monitor for specific messages, but these programs turn on an error indicator when a called program ends with an error. These programs can define an error handler to run when a program ends because of an error.
  8. Packed decimal is implemented in ILE C with the decimal() data type.
  9. Packed decimal is implemented in VisualAge C++ for i5/OS with the Binary Coded Decimal (BCD) class. The BCD class is the C++ implementation of the C-language's decimal(). The BCD object can be used in API calls because it is binary compatible with the decimal() data type.

The following table shows the languages available on the iSeries system and the parameter support that they provide. For more information, see the reference information for the specific programming language that you plan to use.

Language selection considerations -- call conventions

Language 1 Function Return Values 2 Pass by Reference Pass by Value
BASIC X
ILE C X X X
VisualAge C++ for i5/OS X X X
CL X
ILE CL X3 X X3
COBOL X 4
ILE COBOL X X X
MI X X
Pascal X
PL/I X
REXX X
RPG X
ILE RPG X X X
Notes:
  1. You cannot develop Cross System Product (CSP) programs on an iSeries system. You can, however, develop CSP programs on a System/370 and run them on your iSeries.
  2. Return values are used by the UNIX-type APIs and the Dynamic Screen Manager (DSM) APIs.
  3. This support is available only when using the CALLPRC (Call Bound Procedure) command.
  4. COBOL provides a by-content phrase, but it does not have the same semantics as ILE C pass-by-value.
Related concepts
User spaces for list APIs