SQL/MX 3.2.1 Guide to Stored Procedures in Java (H06.26+, J06.15+)

The query displays the compressed Java signature of the ADJUSTSALARY procedure:
Compressed Signature
--------------------------------------------------------------------------
(Ljava/math/BigDecimal;D[Ljava/math/BigDecimal;)V
For more information about the TEXT metadata table, see the SQL/MX Reference Manual.
Specifying the External Path
The external path specifies the location of the Java class file that contains the SPJ method. The
external path is a case-sensitive string identifying the OSS directory or JAR file path where the Java
class file (for example, Payroll.class) resides.
Package Consideration
Do not specify the package name in the EXTERNAL PATH clause. Instead, specify the package
name in the EXTERNAL NAME clause. See Java Method Name (page 64).
Example of a Class File Path
For example, consider the /usr/mydir/myclasses/Payroll.java source file:
package pkg.subpkg;
public class Payroll
{
public static void adjustSalary( BigDecimal empNum,
double percent,
BigDecimal[] newSalary )
...
The Java compiler generates this class file from the Java source file:
/usr/mydir/myclasses/pkg/subpkg/Payroll.class
The correct CREATE PROCEDURE clauses that refer to the adjustSalary() method in the class
file are:
EXTERNAL NAME 'pkg.subpkg.Payroll.adjustSalary'
EXTERNAL PATH '/usr/mydir/myclasses'
Example of a JAR File Path
Suppose that the Payroll.java source file is compiled, and the class file is packaged in a JAR
file, myJar.jar, which resides in the /usr/mydir directory:
/usr/mydir/myJar.jar
The correct CREATE PROCEDURE clauses that refer to the adjustSalary() method in the JAR
file are:
EXTERNAL NAME 'pkg.subpkg.Payroll.adjustSalary'
EXTERNAL PATH '/usr/mydir/myJar.jar'
Naming the Procedure Label
The procedure label is used internally by NonStop SQL/MX to track privileges on an SPJ. Because
the procedure label is used internally by NonStop SQL/MX, it is unnecessary to specify a Guardian
name and location for it.
If you do not specify the LOCATION clause, NonStop SQL/MX generates a system-defined file
with the volume name as specified in the DDL_DEFAULT_LOCATIONS default and subvolume as
the schema of the SPJ, as shown:
\KINGPIN.$TX0115.ZSDX7KT4.SL9FSB00
66 Registering SPJs in NonStop SQL/MX