SQL/MX 3.2 Guide to Stored Procedures in Java (H06.25+, J06.14+)

Writing SPJ Methods
HP NonStop SQL/MX Release 3.2 Guide to Stored Procedures in Java691166-001
3-13
Compiling Java Classes
// This message goes to the output stream.
System.out.println("The salary was updated for employee "
+ empnum);
// This message goes to the error stream.
System.err.println("The salary was not updated for employee "
+ empnum);
...
}
When a CALL statement invokes the SPJ method, a message is written to the file
/usr/mydir/spj.output. If the invocation succeeds, this message is written to the
file:
The salary was updated for employee 202
If the invocation fails, this message is written to the file:
The salary was not updated for employee 202
Compiling Java Classes
Before registering a Java method as an SPJ, you must compile your Java source file
into Java bytecode by using the Java programming language compiler (javac). To
compile a class file, see the NonStop Server for Java Programmer’s Reference or the
NonStop Server for Java Tools Reference Pages.