See: Description
| Package | Description |
|---|---|
| com.iscobol.compiler.custpreproc | |
| com.iscobol.io | |
| com.iscobol.java |
The public interface of the isCOBOL Runtime System.
|
| com.iscobol.logger | |
| com.iscobol.rts | |
| com.iscobol.rts_n |
This is the documentation for the Veryant isCOBOL Java invocation API.
Below is an example of using the isCOBOL Java API to invoke a COBOL program. The example is a typical 'Hello World' program to illustrate the operations that are usually required to invoke COBOL from Java.
import com.iscobol.java.*;
public class CallExample {
public static void main (String argv[]) {
// call the COBOL program
int rc = IsCobol.call("HELLO", new Object[0]);
}
}
Below is a more advanced sample that shows how to pass a parameter.
import com.iscobol.java.*;
import com.iscobol.rts.*;
public class CallExample {
public static void main (String argv[]) {
//define a cobol item
CobolVarHelper myVar = new CobolVarHelper (null, 0).picX ("VAR-1", 20);
ICobolVar var1 = myVar.get ("VAR-1");
var1.set ("MyValue");
// call the COBOL program
int rc = IsCobol.call("PROG", new Object[] {myVar.get()});
}
}