To invoke a procedure that is stored in a database, use the ESQL CALL statement. The stored procedure must be defined by a CREATE PROCEDURE statement that has a Language clause of DATABASE and an EXTERNAL NAME clause that identifies the name of the procedure in the database and, optionally, the database schema to which it belongs.
When you invoke a stored procedure with the CALL statement, the broker ensures that the ESQL definition and the database definition match:
The following restrictions apply to the use of stored procedures:
When you define an ESQL procedure that corresponds to a database stored procedure, you can specify either a qualified name (where the qualifier is a database schema) or an unqualified name.
To create a stored procedure: