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.
Get String Information (CEEGSI)
Register a User Written Condition Handler (CEEHDLR)
Retrieve Operational Descriptor Information (CEEDOD)
Test for Omitted Argument (CEETSTA)
Register Call Stack Entry Termination User Exit Procedure (CEERTX)
Unregister a User Written Condition Handler (CEEHDLU)
Unregister Call Stack Entry Termination User Exit Procedure (CEEUTX)
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 Reference 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:
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.
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:
1 | procedure | Input | HDLR_ENTRY |
2 | token | Input | POINTER |
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).
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 |