ODBC Server Reference Manual
CORE SQL Language
HP NonStop ODBC Server Reference Manual—429151-002
3-35
CALL
CALL
Use CALL to invoke a previously defined Pathway server class program—a stored
procedure—to access the database. Stored procedures are described in detail in
Section 5, Stored Procedures.
Stored procedure execution is not included in ODBC CORE SQL but it is one of the
elements of ODBC Extended SQL that are supported by the NonStop ODBC Server.
Because it is an extension, the CALL statement must be entered as an escape clause.
The CALL statement has the following syntax:
?=
represents the return status, to which the procedure returns its completion status
code. The codes are determined by the server class programmer.
If you specify ?=, but the data source does not return a status code, the HP
NonStop ODBC/MP driver sets the return status to NULL (SQL_NULL_DATA in
ODBC).
If you omit ?=, and the data source returns a status code, the driver ignores the
return value.
procedure-name
identifies the procedure being called. The form of procedure-name is:
[ [database.]owner. ] procedure-identifier
[ database.. ]
The NonStop ODBC Server supports up to 60 characters in the name, but a
maximum of 30 is recommended to allow sharing the procedure with TSQL/ODBC
or TSQL/DBLIB users.
parameter
is either a literal or a dynamic parameter marker, represented by a question mark
(?). In the latter case, you must use the ODBC function SQLSetParam to specify
the value.
--*( VENDOR(Microsoft),PRODUCT(ODBC)
[ ?= ] CALL procedure-name [ ( parameter [, ... ] ) ] )*--
or
{ [?=] CALL procedure-name [ ( parameter [, ... ] ) ] }
Note. In the escape clause format, the --*( ... )*-- or { ... } enclosure is a required element.