ODBC Server Reference Manual
CORE SQL Language
HP NonStop ODBC Server Reference Manual—429151-002
3-36
Example
Considerations
•
If the procedure call supplies more values than the number of parameters defined
in the procedure declaration, the excess values are ignored. No error or warning is
issued.
•
If default values are specified for parameters of a procedure (using the NonStop
ODBC Server catalog utility ADD PROCEDURE), you can execute a stored
procedure without giving a parameter value. The missing values can appear
anywhere in the input parameter list. For example, the procedure
DEBIT_ACCOUNT has two input parameters, NAME and AMOUNT, and can be
called as following:
{ call debit_account( , 100) }
In this case, the account holder’s name is whatever is defined for that parameter in
the procedure declaration; for example, “SMITH”.
If a default value is not specified for a parameter, an error is issued if that
parameter is missing.
•
If the data type of a parameter and its corresponding parameter definition in the
procedure declaration are not compatible, a data conversion error occurs. If data
conversion results in data truncation, a warning is issued. It is the responsibility of
the Pathway server class program to take the appropriate action.
Example
The following statement invokes a stored procedure named DEBIT_ACCOUNT:
{ call debit_account(?,100) }
One parameter is a dynamic parameter marker and the other is a literal. The value for
the dynamic parameter must be set by the SQLSetParam function before the stored
procedure is executed.
CORE SQL Compared With NonStop SQL/MP
NonStop SQL/MP has no statement corresponding to CALL.