SQL/MX 2.x Reference Manual (G06.24+, H06.03+)
SQL/MX Statements
HP NonStop SQL/MX Reference Manual—523725-004
2-30
Considerations for CALL
Considerations for CALL
Usage Restrictions
You can use the CALL statement only as a stand-alone SQL statement in applications 
or interfaces that call 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-145. 
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-39. 
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 
conversion is from the actual output value, which has the data type of the formal 
parameter, to the declared type of the host variable or dynamic parameter. 










