Coding Your Java Program

Restriction: This applies to native code only.

A Java program calls a COBOL entry point by using the functions in RuntimeSystem.class, supplied in mfcobol.jar. This class contains a set of functions named cobcall_returntype(), where returntype is the data type returned by the COBOL program or entry point you want to call. For example, use cobcall_int() to call a COBOL program which returns an integer.

To make COBOL support available to your Java program, include the following statement at the start of your Java source file:

import com.microfocus.cobol.*;