The mi_fp_setargisnull() function

The mi_fp_setargisnull() accessor function sets the value of an argument of a user-defined routine to an SQL NULL in its associated MI_FPARAM structure.

Syntax

void mi_fp_setargisnull(fparam_ptr, arg_pos, is_null)
   MI_FPARAM *fparam_ptr;
   mi_integer arg_pos;
   mi_integer is_null;
fparam_ptr
A pointer to the associated MI_FPARAM structure.
arg_pos
The index position into the null-argument array for the argument that you want set to NULL.
is_null
The value that determines whether the arg_pos+1 argument is NULL.
Valid in client LIBMI application? Valid in user-defined routine?
Yes Yes

Usage

The mi_fp_setargisnull() function sets the routine argument at position arg_pos in the MI_FPARAM structure that fparam_ptr references to the appropriate SQL NULL value. The MI_FPARAM structure stores information about whether routine arguments are NULL in the zero-based null-argument array. To set the nth argument, use an arg_pos value of n-1. For example, the following call to mi_fp_setargisnull() sets to NULL the third argument of the my_func() UDR, with which fparam1 is associated:
mi_integer my_func(..., fparam1)
   ...
   MI_FPARAM *fparam1;
{
   ...
   mi_fp_setargisnull(fparam1, 2, MI_TRUE);
You can specify the following values for the is_null argument.
MI_FALSE
The argument that arg_pos identifies is not NULL.
MI_TRUE
The argument that arg_pos identifies is NULL.

For more information about argument information in an MI_FPARAM structure, see the HCL OneDB™ DataBlade® API Programmer's Guide.

Return values

None.