# Calling COBOL-DB2 program from Natural

**URL:** <https://techcommunity.softwareag.com/t/calling-cobol-db2-program-from-natural/172783>\
**Category:** Forum\
**Tags:** Adabas-Natural, Natural, Natural-on-Mainframes, Natural-Database-and-TP-Monitor-Interfaces-on-Mainframes\
**Created:** [September 30, 2013, 4:10pm UTC](https://techcommunity.softwareag.com/t/calling-cobol-db2-program-from-natural/172783 "2013-09-30T16:10:43Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![Anushri\_Anwekar](https://avatars.discourse-cdn.com/v4/letter/a/5f9b8f/32.png) [@Anushri\_Anwekar](https://techcommunity.softwareag.com/u/Anushri_Anwekar)\
**Post date:** [September 30, 2013, 4:10pm UTC](https://techcommunity.softwareag.com/t/calling-cobol-db2-program-from-natural/172783/1 "2013-09-30T16:10:43Z")

</div>

I am completely new to natural. I have to write a natural program, which will call a COBOL DB2 program to fetch values from DB2 tables. Can anyone help me with the following questions:

1.I came to know that a DB2 DBRM can not be linked directly to Natural nucleaus. Is it true?

1. If natural program has to get values from DB2 table, a COBOL DB2 program should be written and used as a stored procedure and called inside the natural program. Is it correct?

2. If I have to call a DB2 stored procedure in a natural program, is it eseential that DB2 should be installed in my natural?

---

<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:** [September 30, 2013, 5:15pm UTC](https://techcommunity.softwareag.com/t/calling-cobol-db2-program-from-natural/172783/2 "2013-09-30T17:15:02Z")

</div>

1. Yes, but that’s not how a DBRM works anyway.
2. No
3. Yes

More information [here](http://techcommunity.softwareag.com/ecosystem/documentation/natural/nat823mf/dbms/db2-over.htm)

---

<div class="post-metadata">

**Author:** ![Anushri\_Anwekar](https://avatars.discourse-cdn.com/v4/letter/a/5f9b8f/32.png) [@Anushri\_Anwekar](https://techcommunity.softwareag.com/u/Anushri_Anwekar)\
**Post date:** [September 30, 2013, 7:23pm UTC](https://techcommunity.softwareag.com/t/calling-cobol-db2-program-from-natural/172783/3 "2013-09-30T19:23:14Z")

</div>

Thanks a lot for the reply.

So if I want to access db2 data from natural program, is there a way it can be done without installing db2 in natural? Through a cobol db2 program or through any other way?

---

<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:** [October 14, 2013, 5:11am UTC](https://techcommunity.softwareag.com/t/calling-cobol-db2-program-from-natural/172783/4 "2013-10-14T05:11:04Z")

</div>

Yes, you can call a COBOL/DB2 program. The COBOL program should be dynamically loaded (rather than linking statically to the nucleus) - the DBRM can be linked to the COBOL program or (usually preferable) again dynamically loaded.

---

<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:** [April 2, 2021, 3:29pm UTC](https://techcommunity.softwareag.com/t/calling-cobol-db2-program-from-natural/172783/5 "2021-04-02T15:29:32Z")

</div>

Closed on April 2, 2021, 3:29pm UTC


