Parameters in C and C++ routines
Parameter declaration in C and C++ routines must conform to the requirements of one of the supported parameter styles and the program type.
If the routine is to use a scratchpad, the dbinfo structure,
or to have a PROGRAM TYPE MAIN parameter interface, there are additional
details to consider including:
- Parameter styles supported for C and C++ routines
- Parameter null indicators in C and C++ routines
- Parameter style SQL C and C++ procedures
- Parameter style SQL C and C++ functions
- Passing parameters by value or by reference in C and C++ routines
- Parameters are not required for C and C++ procedure result sets
- The dbinfo structure as C or C++ routine parameter
- Scratchpad as C or C++ function parameter
- Program type MAIN support for C and C++ procedures
It is very important that you implement the parameter interface to C and C++ routines correctly. This can be easily done with just a bit of care taken to ensure that the correct parameter style and data types are chosen and implemented according to the specification.