Java SP Wrapper - 2
DemoProc.java source code:
public class DemoProc {
public static void javaProc
( java.lang.String toBeSearched,
java.lang.String searchFor,
DemoProcArg demoProcArg ) {
demoProcArg.returnArg
= toBeSearched.lastIndexOf
( searchFor );
System.out.println
( "java: toBeSearched = " + toBeSearched + "\n"
... );
} // public static void javaProc
} // public class DemoProc
Notes:
The DemoProc.javaProc method will be called from the Watcom SQL sp. It receives two input parameters toBeSearched and searchFor, and returns the answer in the returnArg field that's encapsulated within the demoProcArg parameter. Note that Java is case-sensitive so while DemoProcArg is a class name, demoProcArg is different: it's an actual object (instantiated class).