Specifying Arguments

The argument list of the CALL statement, delimited by parentheses, immediately follows the name of the UDR. If you include no arguments, empty parentheses must follow the name of the UDR. If the list includes more arguments than the UDR expects, you receive an error.

If CALL specifies fewer arguments than the UDR expects, the arguments are said to be missing. The database server initializes missing arguments to their corresponding default values. (See CREATE PROCEDURE and CREATE FUNCTION.) This initialization occurs before the first executable statement in the body of the UDR. If missing arguments do not have default values, they are initialized to the value of UNDEFINED. An attempt to use any variable of UNDEFINED value results in an error.

In each UDR call, you have the option of specifying parameter names for the arguments that you pass to the UDR. Each of the following examples are valid for a UDR that expects character arguments named t, n, and d, in that order:

CALL add_col (t='customer', n = 'newint', d ='integer');
CALL add_col('customer','newint','integer'); 

Both of the CALL statements above have the same effect.

The syntax of the argument list is described in more detail in the topic Arguments.