# Natural/Adabas to Java interface on the same Mainframe LPAR

**URL:** <https://techcommunity.softwareag.com/t/natural-adabas-to-java-interface-on-the-same-mainframe-lpar/296314>\
**Category:** Forum\
**Tags:** Adabas-Natural, Adabas, Natural, Adabas-on-Mainframes, Natural-on-Mainframes, Adabas-Natural-Community-Edition\
**Created:** [May 29, 2024, 3:58pm UTC](https://techcommunity.softwareag.com/t/natural-adabas-to-java-interface-on-the-same-mainframe-lpar/296314 "2024-05-29T15:58:30Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![Kannan\_Alagarsamy](https://sea1.discourse-cdn.com/techcommunity/user_avatar/techcommunity.softwareag.com/kannan_alagarsamy/32/28121_2.png) [@Kannan\_Alagarsamy](https://techcommunity.softwareag.com/u/Kannan_Alagarsamy)\
**Post date:** [May 29, 2024, 3:58pm UTC](https://techcommunity.softwareag.com/t/natural-adabas-to-java-interface-on-the-same-mainframe-lpar/296314/1 "2024-05-29T15:58:30Z")

</div>

Hi All,

May I know the steps, including environmental setup required to complete the following PoC tasks.

1. Java to Natural.
2. Natural to Java.
3. Java to Adabas.

Assumptions:

1. Test those three connections/interface within same Mainframe LPAR (No external environment).
2. Natural vers 9.2.1.

Thanks,  
Kannan A

---

<div class="post-metadata">

**Author:** ![Douglas\_Kelly](https://sea1.discourse-cdn.com/techcommunity/user_avatar/techcommunity.softwareag.com/douglas_kelly/32/102_2.png) [@Douglas\_Kelly](https://techcommunity.softwareag.com/u/Douglas_Kelly)\
**Post date:** [May 29, 2024, 4:49pm UTC](https://techcommunity.softwareag.com/t/natural-adabas-to-java-interface-on-the-same-mainframe-lpar/296314/2 "2024-05-29T16:49:59Z")

</div>

when you say “Java to Natural” and “Natural to Java” what are you trying to do? call services provided in Java from Natural and services provided in Natural to Java?

There is a Java API for calling Adabas, as well as CONNX JDBC that Java can use to access Adabas.

Are you using Java on the mainframe or calling the mainframe from an open systems Java platform?

---

<div class="post-metadata">

**Author:** ![Kannan\_Alagarsamy](https://sea1.discourse-cdn.com/techcommunity/user_avatar/techcommunity.softwareag.com/kannan_alagarsamy/32/28121_2.png) [@Kannan\_Alagarsamy](https://techcommunity.softwareag.com/u/Kannan_Alagarsamy)\
**Post date:** [May 29, 2024, 6:17pm UTC](https://techcommunity.softwareag.com/t/natural-adabas-to-java-interface-on-the-same-mainframe-lpar/296314/3 "2024-05-29T18:17:14Z")

</div>

Thanks you for your prompt response. I need to use the Java on Mainframe and there is no external environment like open systems.

---

<div class="post-metadata">

**Author:** ![Douglas\_Kelly](https://sea1.discourse-cdn.com/techcommunity/user_avatar/techcommunity.softwareag.com/douglas_kelly/32/102_2.png) [@Douglas\_Kelly](https://techcommunity.softwareag.com/u/Douglas_Kelly)\
**Post date:** [May 29, 2024, 9:08pm UTC](https://techcommunity.softwareag.com/t/natural-adabas-to-java-interface-on-the-same-mainframe-lpar/296314/4 "2024-05-29T21:08:45Z")

</div>

when you say “Java to Natural” and “Natural to Java” what are you trying to do? call services provided in Java from Natural and services provided in Natural to Java?

If your services are exposed as web services (REST, SOAP), then you can either use EntireX to wrap those services (simplest) or you can consume services in Natural using the REQUEST DOCUMENT statement.

---

<div class="post-metadata">

**Author:** ![Kannan\_Alagarsamy](https://sea1.discourse-cdn.com/techcommunity/user_avatar/techcommunity.softwareag.com/kannan_alagarsamy/32/28121_2.png) [@Kannan\_Alagarsamy](https://techcommunity.softwareag.com/u/Kannan_Alagarsamy)\
**Post date:** [May 29, 2024, 9:52pm UTC](https://techcommunity.softwareag.com/t/natural-adabas-to-java-interface-on-the-same-mainframe-lpar/296314/5 "2024-05-29T21:52:11Z")

</div>

This is just a PoC and we are trying find a simple way to communicate between Natural/Adabas and Java. Invoking Natural in Java and Java in Natural to support these requirements. Is there a way to use simple communication than using EntireX/RPC/IDL/CONNX tools? Please advise.

---

<div class="post-metadata">

**Author:** ![grantni](https://sea1.discourse-cdn.com/techcommunity/user_avatar/techcommunity.softwareag.com/grantni/32/32058_2.png) [@grantni](https://techcommunity.softwareag.com/u/grantni)\
**Post date:** [May 30, 2024, 12:47pm UTC](https://techcommunity.softwareag.com/t/natural-adabas-to-java-interface-on-the-same-mainframe-lpar/296314/6 "2024-05-30T12:47:41Z")

</div>

If the PoC is looking to do asynchronous communications between mainframe-based Natural/Adabas and distributed Java applications you could consider using a messaging interface (such as IBM MQ) to send and receive messages from either end. EntireX could still factor into that setup to make the interfacing between Natural and MQ work via RPC wrappers although there are other ways to accomplish the same. Having a messaging intermediary can be useful for resilience and scaling dependent on degree of coupling desired and expected usage patterns and requirements.

If you are looking to access Adabas (data) from distributed Java then using middleware to support SQL-based data access could be used. In that setup the assumption is you don’t need to call NATURAL (or have Natural call Java).

With EntireX you could make use of RPC calls and could think of NATURAL/Adabas applications as being similar to remote-procedure calls (or perhaps think of them as database stored procedures if you are looking for the NATURAL code to perform the business logic working off Adabas-based data).

The latter two are more tightly coupled requiring running processes (or triggers to initiate services) etc. All doable of course but needs testing and thinking around monitoring; alerting; error handling and performance tuning dependent on the use-case.

For your PoC I think you need to spell out the intended use-case and requirements you would want to prove out…

---

<div class="post-metadata">

**Author:** ![Eugene.Miklovich](https://avatars.discourse-cdn.com/v4/letter/e/ce73a5/32.png) [@Eugene.Miklovich](https://techcommunity.softwareag.com/u/Eugene.Miklovich)\
**Post date:** [May 30, 2024, 1:17pm UTC](https://techcommunity.softwareag.com/t/natural-adabas-to-java-interface-on-the-same-mainframe-lpar/296314/7 "2024-05-30T13:17:37Z")

</div>

There are many ways to do this but here are some simple ways:

---

<div class="post-metadata">

**Author:** ![system](https://global.discourse-cdn.com/techcommunity/original/3X/c/d/cd19967bb605d28a72d77eb83a1cae22f3df2eb8.svg) [@system](https://techcommunity.softwareag.com/u/system)\
**Post date:** [November 26, 2024, 1:17pm UTC](https://techcommunity.softwareag.com/t/natural-adabas-to-java-interface-on-the-same-mainframe-lpar/296314/8 "2024-11-26T13:17:44Z")

</div>

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.
