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

Registering SPJs in NonStop SQL/MX
HP NonStop SQL/MX Guide to Stored Procedures in Java523727-004
4-11
Specifying an SQL Access Mode
You can also use the LOCATION clause to specify only the volume of the procedure
label:
LOCATION $DISKVOL
In this case, the node is the same node where the SPJ is registered, the subvolume is
the same as the schema of the SPJ, and the file name is system generated.
For information about naming rules for the LOCATION clause, see the SQL/MX
Reference Manual.
Specifying an SQL Access Mode
The SQL access mode indicates whether an SPJ performs SQL operations. Specifying
the SQL access mode for an SPJ is entirely optional. If you do not specify the access
mode in the CREATE PROCEDURE statement, the default is CONTAINS SQL, and
the capability of the SPJ is MODIFIES SQL DATA.
If the SPJ does not perform SQL operations, specify the optional NO SQL clause.
Even if the SPJ method does not perform SQL operations and the access mode is
CONTAINS SQL, the SPJ still executes successfully. However, if you specify NO SQL
for an SPJ method that performs SQL operations, NonStop SQL/MX returns an error
when you try to invoke the SPJ.
To describe the types of SQL operations that an SPJ performs, specify one of these
optional clauses: CONTAINS SQL, MODIFIES SQL DATA, or READS SQL DATA. All
these options have the same capabilities as MODIFIES SQL DATA. Specify one of
these options when registering a method that contains SQL statements and that is part
of the class file of a JDBC/MX or SQLJ program. For information about JDBC/MX, see
the JDBC Driver for SQL/MX Programmers Reference. For information about SQLJ,
see the SQL/MX Programming Manual for Java.