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-3
Naming the Stored Procedure
When selecting a procedure name:
Choose a meaningful and unique name that does not already exist for a procedure,
table, view, or SQL/MP alias in the same schema.
For example, use the procedure name ADJUSTSALARY for a Java method named
adjustSalary() that adjusts an employee’s salary in the EMPLOYEE table.
Use delimited identifiers sparingly. The procedure name is upshifted for
interpretation except for the parts that you specify as delimited identifiers.
For example, if you specify a procedure name of AdjustSalary in the CREATE
PROCEDURE statement, the interpreted name is ADJUSTSALARY. To call this
SPJ, you can use lowercase or uppercase for the procedure name, as shown:
CALL samdbcat.persnl.adjustsalary(202, 5.5, ?);
If you specify a procedure name of "AdjustSalary" in the CREATE
PROCEDURE statement, the interpreted name is "AdjustSalary". To call this
SPJ, you must delimit the case-sensitive part of the procedure name in double
quotes, as shown:
CALL samdbcat.persnl."AdjustSalary"(202, 5.5, ?);
For information about delimited identifiers, see the SQL/MX Reference Manual.
Qualify the procedure name with an existing catalog and schema. If you do not
fully qualify the procedure name, NonStop SQL/MX qualifies it according to the
current settings of CATALOG and SCHEMA in the SYSTEM_DEFAULTS table. If
the NAMETYPE attribute is set to NSK instead of ANSI and you do not fully qualify
the procedure name, NonStop SQL/MX returns an error. For more information, see
the SQL/MX Reference Manual.
Note that NonStop SQL/MX does not support the overloading of procedure names
and disallows the use of the same procedure name with different signatures. That
is, you cannot register the same procedure name more than once with different
underlying SPJ methods.