SQL/MX 2.x Reference Manual (G06.24+, H06.03+)
SQL/MX Statements
HP NonStop SQL/MX Reference Manual—523725-004
2-31
Examples of CALL
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.










