CALL The CALL statement allows to invoke stored procedures. General Format Format 1 EXEC SQL [AT Database] CALL Procedure-Name ( [Parameters] ) [ INTO Host-Variable ] END-EXEC Format 2 EXEC SQL [AT Database] [ Host-Variable = ] CALL Procedure-Name ( [Parameters] ) END-EXEC Syntax Rules 1. Multiple parameters must be separated by commas. 2. Each parameter name might be followed by the parameter type. The type can be IN, OUT or INOUT. General Rules 1. Database identifies the active connection that will execute the query and must be previously defined using a Format 4 DECLARE statement. 2. Only one destination Host-Variable is allowed. If the stored procedure returns multiple fields or multiple rows, rely on a cursor defined using a Format 1 DECLARE statement. 3. If the parameter type is not specified, the runtime will try to retrieve the type from the JDBC driver. Examples Call a Database Stored Procedure that updates values on a totals table (the logic of the update is DB Server based and stored) exec sql call update_totals() end-exec Call a Database Stored Procedure with an input parameter and an output parameter, storing the result in a destination data item exec sql call proc1(:p1 IN, :p2 OUT) into :exit-status end-exec