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

Writing SPJ Methods
HP NonStop SQL/MX Guide to Stored Procedures in Java540433-003
3-14
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 Programmers Reference
or the
NonStop Server for Java Tools Reference Pages
.