ILE CEE API Calling and Naming Conventions

You access ILE CEE APIs using the same call mechanisms currently used by HLLs to support calls in general.

If you use ILE C, you can use an ILE CEE API with the syntax shown in the following example.

#include <leawi.h>
main ()
{
 CEExxxx(&parm1, &parm2, ... &parmn, &fc);
}

If you use ILE COBOL, you can call most of the ILE CEE APIs using the following syntax.

CALL PROCEDURE 'CEExxxx'
                USING parm1, parm2, ... parmn, fc.

The following APIs require a different calling convention in ILE COBOL than that shown above.

In the SPECIAL-NAMES paragraph specify:

LINKAGE TYPE
    SYS FOR 'CEExxxx' 'CEEyyyy' ...
for the APIs that are to be called. In the PROCEDURE DIVISION, the APIs are called using the following syntax.
CALL      'CEExxxx' USING parm1, parm2, ... parmn, fc.
 .
 .
 .
CALL      'CEEyyyy' USING parm1, parm2, ... parmn, fc.

If you use ILE RPG, you call an ILE CEE API using the following syntax.

C                   CALLB   'CEExxxx'
C                   PARM                  parm1
C                   PARM                  parm2
                    ...
C                   PARM                  parmn
C                   PARM                  fc

Note: Operational descriptors are used for some of the ILE CEE APIs, for example, CEEDATE. Refer to the section on #pragma descriptors in the WebSphere Development Studio: C/C++ Language ReferenceLink to PDF book for information on how to properly pass arguments to these ILE CEE APIs from inside a C program.

If you use ILE COBOL, you can call functions that require operational descriptors using the following syntax.

SPECIAL NAMES.
    LINKAGE PROCEDURE FOR 'CEExxxx' USING ALL DESCRIBED.

PROCEDURE DIVISION.
    CALL PROCEDURE 'CEExxxx'
                USING parm1, parm2, ... parmn, fc.

If you use ILE RPG, you can call functions that require operational descriptors using either of the following approaches.

C                   CALLB(D)   'CEExxxx'
C                   PARM                  parm1
C                   PARM                  parm2
                    ...
C                   PARM                  parmn
C                   PARM                  fc

or

D CEExxxx         PR                  OPDESC
D   parm1
D   parm2
D   ...
D   parmn
D   fc

C                   CALLP     CEExxxx(parm1 : parm2 :
C                                     ... : parmn : fc)

Note: If you use ILE RPG to call ILE CEE APIs, the following restriction applies:

The following descriptions apply to the call syntax shown in the ILE language examples above:

leawi.h
The name of the header file for C prototypes

Note: Header files used with ILE CEE APIs are in library QSYSINC. To ensure that these header files are found during compilation, specify *YES on the SYSINC parameter of the CRTCMOD or CRTBNDC CL commands. Also ensure that the Openness Includes can be selected as an option under GO LICPGM during the installation of the i5/OS(TM) operating system.

CEExxxx
The name of the ILE CEE API

parm1, parm2, ... parmn
Omissible or required parameters passed to or returned from the called ILE CEE API. The & character in the syntax for ILE C indicates that the parameters are explicitly passed by reference.

fc
An omissible feedback code that indicates the result of the ILE CEE API. The & character in the syntax for ILE C indicates that the parameter is explicitly passed by reference.

The order in which the parameters are listed in the parameter table for each ILE CEE API, is the order in which the parameters must be specified. For example, the following table shows the parameters for the CEEHDLR API:


  Required Parameter Group:

1 procedure Input HDLR_ENTRY
2 token Input POINTER

  Omissible Parameter:

3 fc Output FEEDBACK

When you call the CEEHDLR API, the first parameter you specify must be procedure (number 1 in the table), followed by token (number 2 in the table), and then fc (number 3 in the table).


Naming Conventions of the ILE CEE APIs

Most ILE CEE APIs are available to any HLL that ILE supports. Naming conventions of the ILE CEE APIs are as follows:

For more information about using ILE CEE APIs, see the following sections:


Top | ILE CEE APIs | APIs by category