Omitting Parameters in ILE CEE APIs

The ILE CEE APIs have parameters that can be omitted. The parameter table for each ILE CEE API uses the term omissible for these parameters.

Warning:  It is essential to pass the correct number of parameters, including omitted parameters. You need to use the language-specific syntax for omitted parameters; failure to do so may result in unpredictable results, including a system failure.

For ILE C, you can omit a parameter by passing a null pointer in place of the parameter. The following example in ILE C omits the fc parameter in the call to the API.

#include <leawi.h>
main ()
{
 CEExxxx(&parm1, &parm2, ... &parmn, NULL);
}                        /* NULL is used instead  */
                         /* of the omitted parameter */
For ILE COBOL, you can omit a parameter by specifying the reserved word OMITTED in place of the parameter. The following example in ILE COBOL omits the fc parameter in the call to the API.
CALL PROCEDURE 'CEExxxx'
                USING parm1, parm2, ... parmn, OMITTED.
For ILE RPG, you can omit a parameter by specifying *OMIT in the result field of a PARM opcode. The following example omits the fc parameter in the call to the API.
C                   CALLB   'CEExxxx'
C                   PARM                  parm1
C                   PARM                  parm2
         ...
C                   PARM                  parmn
C                   PARM                  *OMIT
For ILE RPG if you use a prototyped call when you code the prototype, you specify OPTIONS(*OMIT) in the keywords area of the omissible parameter. Then you can specify *OMIT for that parameter on the call.
D CEExxxx         PR                  OPDESC
D   parm1
D   parm2
D   ...
D   parmn
D   fc                                OPTIONS(*OMIT)

C                   CALLP     CEExxxx(parm1 : parm2 :
C                   ... : parmn : *OMIT)

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


Top | ILE CEE APIs | APIs by category