SQL/MX Guide to Stored Procedures in Java (G06.24+, H06.03+)

Invoking SPJs in NonStop SQL/MX
HP NonStop SQL/MX Guide to Stored Procedures in Java523727-004
5-15
Invoking SPJs in an SQLJ Program
Invoking SPJs in an SQLJ Program
An SQLJ program is a Java program that contains embedded SQL statements in SQLJ
clauses. In an SQLJ program, you can invoke an SPJ in a CALL statement.
Place the CALL statement within an SQLJ executable clause:
In an SQLJ program, the host variables and expressions in a CALL statement are in
the IN parameter mode by default. Therefore, you should explicitly code the INOUT
and OUT arguments of CALL statements as shown in this example:
#sql { CALL adjustsalary (:IN empnum,
:IN percent,
:OUT newsalary) };
For more information about writing SQLJ programs, see the SQL/MX Programming
Manual for Java.
#sql {CALL procedure-name ([parameter[{, parameter}...]])};