# COBOL Subroutines

**URL:** <https://techcommunity.softwareag.com/t/cobol-subroutines/61211>\
**Category:** Forum\
**Tags:** Adabas-Natural, Natural, Natural-on-Mainframes\
**Created:** [July 13, 2006, 10:00pm UTC](https://techcommunity.softwareag.com/t/cobol-subroutines/61211 "2006-07-13T22:00:36Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![thespin](https://avatars.discourse-cdn.com/v4/letter/t/8c91f0/32.png) [@thespin](https://techcommunity.softwareag.com/u/thespin)\
**Post date:** [July 13, 2006, 10:00pm UTC](https://techcommunity.softwareag.com/t/cobol-subroutines/61211/1 "2006-07-13T22:00:36Z")

</div>

Can Natural Programs call COBOL subroutines ? Is it different from calling a Natural subprogram ?

I see where Natural online can ‘call’ CICS programs. Is the Natural online running under CICS ?

Is there a COBOL-\>Natural conversion program available ?

---

<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:** [July 19, 2006, 12:46am UTC](https://techcommunity.softwareag.com/t/cobol-subroutines/61211/2 "2006-07-19T00:46:49Z")

</div>

Natural programs can call COBOL subroutines. Use the “CALL” statement instead of CALLNAT. Natural uses the calling conventions of the environment that it is running in. Thus, if you want to CALL ‘CBLRTN’ from Natural in TSO or batch, the called routine must be compiled as a standard (not CICS) routine; if you want to call it from Natural in CICS, then “CBLRTN” must be defined to the PPT and use CICS calling conventions (COMMAREA for parameters).

There are examples provided in the documentation and SYSEX\* libraries.

(There is an alternative for CICS to call routines using standard linkage rather than CICS linkage - I don’t recommend it particularly, but it is documented in the Natural documentation).

---

<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:** [July 19, 2006, 1:41pm UTC](https://techcommunity.softwareag.com/t/cobol-subroutines/61211/3 "2006-07-19T13:41:46Z")

</div>

Software AG UK offer COBOL to Natural conversion services, see [url][404](http://www.softwareag.com/UK/service/conv/default.asp%5B/url%5D) for more details and / or contact your local Software AG office.

---

<div class="post-metadata">

**Author:** ![thespin](https://avatars.discourse-cdn.com/v4/letter/t/8c91f0/32.png) [@thespin](https://techcommunity.softwareag.com/u/thespin)\
**Post date:** [July 20, 2006, 4:04am UTC](https://techcommunity.softwareag.com/t/cobol-subroutines/61211/4 "2006-07-20T04:04:17Z")

</div>

Thanks all … very much.

---

<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, 2:40pm UTC](https://techcommunity.softwareag.com/t/cobol-subroutines/61211/5 "2021-04-02T14:40:44Z")

</div>


