SQL/MX 3.2 Guide to Stored Procedures in Java (H06.25+, J06.14+)
Invoking SPJs in NonStop SQL/MX
HP NonStop SQL/MX Release 3.2 Guide to Stored Procedures in Java—691166-001
5-8
Using MXCI with SPJ RS
The output of the prepared CALL statement is:
In an MXCI session, invoke the SPJ named TOTALPRICE again by preparing and
executing a CALL statement in which all three parameters accept values that are set
by the USING clause of the EXECUTE statement. The INOUT parameter returns the
total price:
PREPARE stmt2 FROM CALL totalprice(?,?,?);
EXECUTE stmt2 USING 3, 'economy', 16.99;
The output of the prepared CALL statement is:
Using MXCI with SPJ RS
In an MXCI session, invoking the SPJ named ORDERSUMMARY returns one
LARGEINT value as an output parameter and returns a maximum of two result sets.
The output parameter row (which in this case contains one column named
NUM_ORDERS) is displayed first followed by two stored procedure result sets.
Prepare and run the following CALL statement:
CALL samdbcat.sales.order_summary('01/01/2001', ?);
PRICE
---------------------
136.77
--- SQL operation complete.
PRICE
---------------------
57.12
--- SQL operation complete.










