For details of the syntax and parameters of the CALL statement, see CALL statement. For an example of the use of CALL, see the examples in CREATE PROCEDURE statement .
A routine is invoked as an ESQL method if the routine's definition specifies a LANGUAGE clause of ESQL or if the routine is a built-in function.
There must be an exact one-to-one matching, between the definition and the CALL, of the data types and directions of each parameter.
An ESQL routine is allowed to return any ESQL data type, excluding List and Row.
A routine is invoked as a Java method if the routine's definition specifies a LANGUAGE clause of JAVA.
There must be an exact one-to-one matching, between the definition and the CALL, of the data types and directions of each parameter.
If the Java method has a void return type, the INTO clause cannot be used because there is no value to return.
A Java routine can return any data type in the ESQL-to-Java data-type mapping table. Note that this excludes List and Row.
A routine is invoked as a database stored procedure if the routine's definition has a LANGUAGE clause of DATABASE.
When a call is made to a database stored procedure, the broker searches for a definition (created by a CREATE PROCEDURE statement) that matches the procedure's local name. The broker then uses the following sequence to resolve the name by which the procedure is known in the database and the database schema to which it belongs:
If the called routine has any DYNAMIC RESULT SETS specified in its definition, the number of expressions in the CALL statement's ParameterList must match the number of actual parameters to the routine, plus the number of DYNAMIC RESULT SETS. For example, if the routine has three parameters and two DYNAMIC RESULT SETS, the CALL statement must pass five parameters to the called routine. The parameters passed for the two DYNAMIC RESULT SETS must be list parameters; that is, they must be field references qualified with array brackets [ ]; for example, Environment.ResultSet1[].
A database stored procedure is allowed to return any ESQL data type, excluding Interval, List, and Row.
Notices |
Trademarks |
Downloads |
Library |
Support |
Feedback
![]() ![]() |
ac06009_ |