CALL
Description
Invokes a built-in FairCom DB SQL procedure or Java stored procedure (JSP).
Syntax
[ ? = ] CALL proc_name([parameter][, ... ]);
Arguments
[ ? = ]
A parameter marker for the return value of the procedure. Programs must determine if the procedure returns a value and use the parameter marker as a placeholder for a variable that will receive the return value.
CALL proc_name
The name of the procedure to invoke.
parameter
Literal or variable values to pass to the procedure.
Example
The following example shows invocation of the SQLPROC built-in procedure from interactive FairCom DB SQL. It invokes SQLPROC to retrieve information about another built-in procedure, SQLTABLES:
CALL SQLPROC('',0,'admin',6,'sqltables',9); -- specific procedure
PROCEDURE_QUALIFIER PROCEDURE_OWNER PROCEDURE_NAME NUM_INPU
------------------- --------------- -------------- --------
NUM_OUTP NUM_RESU REMARKS PROCEDUR
-------- -------- ------- ---------
admin sqltables 6 0
1 Returns info about a table 1 1 record returned
Authorization
SQL Compliance |
ODBC Extended SQL grammar, when enclosed in ODBC escape clause |
Environment |
Embedded SQL, interactive SQL, ODBC applications |
Related Statements |
CREATE PROCEDURE, DROP PROCEDURE |