mi_unsigned_char1 mi_fp_argisnull(fparam_ptr, arg_pos)
MI_FPARAM *fparam_ptr;
mi_integer arg_pos;
The mi_fp_argisnull( ) function determines whether the routine argument at position arg_pos in the MI_FPARAM structure that fparam_ptr references contains the SQL NULL value. The MI_FPARAM structure stores information about whether routine arguments contain the NULL value in the zero-based null-argument array. Therefore, to obtain information about the nth argument, use an arg_pos value of n-1. For example, the following call to mi_fp_argisnull( ) determines whether the third argument of the my_func( ) UDR is NULL:
mi_integer my_func(..., fparam1) ... MI_FPARAM *fparam1; { ... if ( mi_fp_argisnull(fparam1, 2) == MI_TRUE ) /* code to handle NULL argument */
Routines that handle NULL arguments must be registered with the HANDLESNULLS routine modifier of the CREATE FUNCTION or CREATE PROCEDURE statement.
See also the descriptions of mi_fp_arglen( ), mi_fp_argprec( ), mi_fp_argscale( ), mi_fp_argtype( ), mi_fp_returnisnull( ), mi_fp_setargisnull( ), and mi_fp_setreturnisnull( ).
For more information about argument information in an MI_FPARAM structure, see the IBM Informix: DataBlade API Programmer's Guide.