Admin Production rocket
Current Publication

Overview - Calling Native OO COBOL from Java

Enterprise Developer for Visual Studio 2017 V7.0
Rocket® Enterprise Developer (formerly a product of Micro Focus or formerly a product of Open Text) documentation, created before Rocket Software acquired certain products from OpenText, may include outdated references to "Micro Focus" or "OpenText", both of which are trademarks of OpenText or its affiliates. Rocket Software is not affiliated with Micro Focus or OpenText and has since rebranded these products as Rocket® products. You may also encounter outdated links in this documentation. If you do, please contact Rocket Support (support@rocketsoftware.com) for assistance.

Overview - Calling Native OO COBOL from Java

Restriction: This applies to native code only.

You can write classes in native OO COBOL which can be called from Java programs as though they were Java classes. You do this by providing a Java wrapper class, which provides a function for each method in the native OO COBOL class.

The functions in the Java wrapper class put all the parameters for the method into a Java array, and then call one of the member functions of Java class com.microfocus.cobol.RuntimeSystem to invoke the method in the native OO COBOL class and return the result. This is shown in the figure below:


Calling OO COBOL from Java