SQL/MX 2.x Reference Manual (H06.04+)

SQL/MX Statements
HP NonStop SQL/MX Reference Manual540440-003
2-28
Considerations for CALL
Interval value expressions are disallowed in SPJs. For more information, see
Input Parameter Arguments on page 2-28 and Output Parameter Arguments
on page 2-28.
Considerations for CALL
Usage Restrictions
You can use the CALL statement only as a stand-alone SQL statement in applications
or interfaces that call NonStop SQL/MX. You cannot use the CALL statement inside a
compound statement, in a trigger, or with rowsets.
Required Privileges
To execute the CALL statement, you must have EXECUTE privilege on the procedure.
For more information, see the GRANT EXECUTE Statement on page 2-141.
Input Parameter Arguments
You pass data to an SPJ by using IN or INOUT parameters. For an IN parameter
argument, use one of these SQL expressions:
Literal
SQL function (including CASE and CAST expressions)
Arithmetic or concatenation operation
Scalar subquery
Host variable (for example, :hostvar)
Dynamic parameter (for example, ? or ?param)
For more information, see Expressions on page 6-37.
For an INOUT parameter argument, you can use only a host variable or dynamic
parameter.
Output Parameter Arguments
An SPJ returns values in OUT and INOUT parameters. Output parameter arguments
must be either host variables in a static CALL statement (for example, :hostvar) or
dynamic parameters in a dynamic CALL statement (for example, ? or ?param). Each
calling application defines the semantics of the OUT and INOUT parameters in its
environment. For more information, see the SQL/MX Guide to Stored Procedures in
Java.
Data Conversion of Parameter Arguments
NonStop SQL/MX performs an implicit data conversion when the data type of a
parameter argument is compatible with but does not match the formal data type of the
stored procedure. For stored procedure input values, the conversion is from the actual
argument value to the formal parameter type. For stored procedure output values, the