Obtain a routine identifier
To obtain the identifier for a UDR or cast function that a function descriptor describes, use the mi_routine_id_get() function. A routine identifier is a unique integer that identifies a UDR within the sysprocedures system catalog. This routine identifier is stored in the procid column of sysprocedures.
The following code fragment obtains the identifier for the numeric_func() function
that accepts INTEGER arguments:
MI_CONNECTION *conn;
MI_FUNC_DESC *fdesc;
mi_integer rout_id;
...
fdesc = mi_routine_get(conn, 0,
"function numeric_func(integer, integer)");
rout_id = mi_routine_id_get(conn, fdesc);
If your UDR is executing many other UDRs and it needs to keep several function descriptors for subsequent execution, it can use the routine identifiers to distinguish the different function descriptors.