Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Utilizing Java API from a Cobol program

We have some COBOL programs running on our mainframe and we need one of those to communicate with our back end vault through a Java API. Is there any way a Cobol program can invoke the Java program?

Would it be possible to use a Web Service from Cobol? How would I integrate a Cobol program with anything else?

like image 641
Héctor Ramos Avatar asked May 10 '26 10:05

Héctor Ramos


1 Answers

Found this:

A COBOL program can interoperate with JAVA.

To achieve inter-language interoperability with Java™, you must follow certain rules and guidelines for: Using services in the Java Native Interface (JNI) Coding data types Compiling your COBOL programs You can invoke methods that are written in Java from COBOL programs, and you can invoke methods that are written in COBOL from Java programs. For basic Java object capabilities, you can use COBOL object-oriented language. For additional Java capabilities, you can call JNI services.

Because Java programs might be multi-threaded and use asynchronous signals, compile your COBOL programs with the THREAD option.

Also, we are using Cobol Enterprise, which has support for web services. The integration shall then be done using the WS functionality found in Cobol Enterprise.

like image 177
Héctor Ramos Avatar answered May 12 '26 00:05

Héctor Ramos



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!