Invoke a UDR in an SPL routine
You use the CALL statement only to invoke a UDR from within
an SPL program. You can use CALL to invoke both user-defined functions
and user-defined procedures, as follows:
- When you invoke a user-defined function with the CALL statement,
you must include a RETURNING clause and the name of the value or values
that the function returns.The following statement invokes the equal() function:
CALL equal (arg1, arg2) RETURNING result
You cannot use the CALL statement to invoke a user-defined function that contains an OUT parameter.
- A RETURNING clause is never present when you invoke a user-defined
procedure with the CALL statement because a procedure does not return
a value.The following CALL statement invokes the log_compare() procedure:
CALL log_compare (arg1, arg2)