Try OpenEdge Now
skip to main content
SQL Reference
SQL Reference : OpenEdge SQL Statements : CALL
 

CALL

Invokes a stored procedure.
Note: SQL limits recursive invocation of a stored procedure to five levels.

Syntax

CALL proc_name ( [parameter][ , ...] );

Parameters

proc_name
The name of the procedure to invoke.
parameter
Literal or variable value to pass to the procedure.

Example

This example shows an excerpt from an ODBC application that calls a stored procedure (order_parts) using the ODBC syntax {call procedure_name (param)}:
SQLUINTEGER Part_num;
SQLINTEGER Part_numInd = 0;
// Bind the parameter.
SQLBindParameter (hstmt, 1, SQL_PARAM_INPUT,
SQL_C_SLONG, SQL_INTEGER, 0, 0, &Part_num, 0, Part_numInd);
// Place the department number in Part_num.
Part_num = 318;
// Execute the statement.
SQLExecDirect(hstmt, "{call order_parts(?)}", SQL_NTS);
* Authorization
* Related statements