SQL/MX 2.x Reference Manual (H06.04+)
SQL/MX Statements
HP NonStop SQL/MX Reference Manual—540440-003
2-29
Examples of CALL
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.
Null Input and Output
You can pass a null value as input to or output from an SPJ, provided that the
corresponding Java data type of the parameter supports nulls. If a null is input or
output for a parameter that does not support nulls, NonStop SQL/MX returns an error.
For more information on handling null input and output, see the SQL/MX Guide to
Stored Procedures in Java.
Transaction Semantics
The CALL statement automatically initiates a transaction if there is no active
transaction. However, the failure of a CALL statement does not always automatically
abort the transaction. For more information, see the SQL/MX Guide to Stored
Procedures in Java.
Examples of CALL
•
In MXCI, invoke an SPJ named MONTHLYORDERS, which has one IN parameter
represented by a literal and one OUT parameter represented by a dynamic
parameter ?:
CALL samdbcat.sales.monthlyorders(3,?);
•
From an embedded SQL program in C, invoke an SPJ named
MONTHLYORDERS, which has an OUT parameter represented by a host variable:
EXEC SQL CALL samdbcat.sales.monthlyorders(3,:orders);
For more examples, see the SQL/MX Guide to Stored Procedures in Java.










