Highlighted
maruthi_akula Absent Member.
Absent Member.
769 views

how to create a cobol api call to non cobol api programs??

Jump to solution

we are looking for options to call a non cobol api's from native cobol programs :: using visual cobol with eclipse

0 Likes
1 Solution

Accepted Solutions
Micro Focus Expert
Micro Focus Expert

RE: how to create a cobol api call to non cobol api programs??

Jump to solution

Can you please be more specific? Which API are you wishing to call and in which language is the application written?

Is this under Windows or Linux/Unix?

There is a section in the docs which covers mixed language programming which can be found here.

If you are trying to call Java then there is a different section which covers that here.

 

If you provide us with more detail perhaps we can point you in the right direction.

Thanks.

0 Likes
3 Replies
Micro Focus Expert
Micro Focus Expert

RE: how to create a cobol api call to non cobol api programs??

Jump to solution

Can you please be more specific? Which API are you wishing to call and in which language is the application written?

Is this under Windows or Linux/Unix?

There is a section in the docs which covers mixed language programming which can be found here.

If you are trying to call Java then there is a different section which covers that here.

 

If you provide us with more detail perhaps we can point you in the right direction.

Thanks.

0 Likes
maruthi_akula Absent Member.
Absent Member.

RE: how to create a cobol api call to non cobol api programs??

Jump to solution
Hello Chris , Thank for you prompt reply.

i'm working with Visual COBOL 2.3 and planning to call our cobol programs from API, by building API( assumed gonna develop in JAVA ).

we are exploring Visual cobol for eclipse documents. how to create channels like webservices or gateways.
0 Likes
Micro Focus Expert
Micro Focus Expert

RE: how to create a cobol api call to non cobol api programs??

Jump to solution
I'm afraid your descriptions are inconsistent, which makes it difficult to provide recommendations.

In your first post, you wrote "call non-COBOL APIs from native COBOL programs". In this one, you say you're calling COBOL from non-COBOL. Which is it? Or is it both?

If your COBOL programs are native, then you can't call programs written in a managed language such as Java[1] directly. (Calls to code written in other native languages generally can be done directly, using the appropriate calling-convention and parameter types, since they'll share the platform ABI.) Calling Java in-process from any native program requires instantiating a JVM; calling native code in-process from Java requires the Java Native Interface (JNI).

In this latest post, though, you mention Web Services and "gateways". I don't know what specifically you're referring to by the latter, but it's certainly possible to create interfaces between native COBOL and managed languages using Web Services and other distributed-programming techniques. Whether these are "APIs" is a question of semantics.

The Visual COBOL for SOA and Enterprise Developer / Enterprise Server products support COBOL SOAP and REST Web Services and Web Service clients. They also support COBOL programs as Enterprise JavaBeans, which can be invoked by Java programs running in a J2EE container such as WebSphere.

[1] "Java" isn't an acronym, and needn't be written in block capitals.
0 Likes
The opinions expressed above are the personal opinions of the authors, not of Micro Focus. By using this site, you accept the Terms of Use and Rules of Participation. Certain versions of content ("Material") accessible here may contain branding from Hewlett-Packard Company (now HP Inc.) and Hewlett Packard Enterprise Company. As of September 1, 2017, the Material is now offered by Micro Focus, a separately owned and operated company. Any reference to the HP and Hewlett Packard Enterprise/HPE marks is historical in nature, and the HP and Hewlett Packard Enterprise/HPE marks are the property of their respective owners.