# Mainframe execution of external routines in batch NDV server from NaturalONE

**URL:** <https://techcommunity.softwareag.com/t/mainframe-execution-of-external-routines-in-batch-ndv-server-from-naturalone/207550>\
**Category:** Forum\
**Tags:** Adabas-Natural, Natural, NaturalONE, NaturalONE-Full-Edition\
**Created:** [March 11, 2020, 1:20pm UTC](https://techcommunity.softwareag.com/t/mainframe-execution-of-external-routines-in-batch-ndv-server-from-naturalone/207550 "2020-03-11T13:20:36Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![A\_DBA](https://avatars.discourse-cdn.com/v4/letter/a/ee59a6/32.png) [@A\_DBA](https://techcommunity.softwareag.com/u/A_DBA)\
**Post date:** [March 11, 2020, 1:20pm UTC](https://techcommunity.softwareag.com/t/mainframe-execution-of-external-routines-in-batch-ndv-server-from-naturalone/207550/1 "2020-03-11T13:20:36Z")

</div>

We have NaturalONE, and a batch NDV server on mainframe. We have a lot of code that says IF \*DEVICE = ‘BATCH’ or = ‘COLOR’ (CICS) execute a batch or CICS version of a routine. When executing ONE/NDV \*DEVICE is BROWSER and it could take either path (or none).

If it takes the CICS path we correctly get a NAT0920 - because CICS modules aren’t in the batch-NDV step lib concatenation.

If it takes the batch path it inevitably abends S0C4.

Any other mainframe folk having similar issues?

Anyone looked at the CICS Adaptor? Does it work with ONE, or is it just a left-over for Studio/SpoD? And if it does work with ONE is one’s Natural execution (Run As Natural Application) dispatched under the batch-NDV or in the CICS region? The manual isn’t very clear. What the purpose nor advantages of CICS Adaptor is.

Am I conflating two issues - \*DEVICE and CICS Adaptor? Although if Natural execution under ONE was dispatched under CICS then \*DEVICE would be COLOR and CICS external routines would be found and all our troubles would go away.

If we can get batch external modules working it still means having to look for \*DEVICE (and \*TPSYS) logic and ensure the batch path is taken for BROWSER (and SERVSTUB).

Thank you!

---

<div class="post-metadata">

**Author:** ![Ralph\_Zbrog](https://sea1.discourse-cdn.com/techcommunity/user_avatar/techcommunity.softwareag.com/ralph_zbrog/32/78_2.png) [@Ralph\_Zbrog](https://techcommunity.softwareag.com/u/Ralph_Zbrog)\
**Post date:** [March 11, 2020, 11:54pm UTC](https://techcommunity.softwareag.com/t/mainframe-execution-of-external-routines-in-batch-ndv-server-from-naturalone/207550/2 "2020-03-11T23:54:28Z")

</div>

I suspect the S0C4 is a result of missing WORK file definitions.

---

<div class="post-metadata">

**Author:** ![A\_DBA](https://avatars.discourse-cdn.com/v4/letter/a/ee59a6/32.png) [@A\_DBA](https://techcommunity.softwareag.com/u/A_DBA)\
**Post date:** [March 13, 2020, 7:51am UTC](https://techcommunity.softwareag.com/t/mainframe-execution-of-external-routines-in-batch-ndv-server-from-naturalone/207550/3 "2020-03-13T07:51:46Z")

</div>

The external COBOL routine doesn’t access work files. I’m not sure how WORK file definitions are related, but I’m open to ideas. As ONE is more tp-monitor-like than batch-like we hadn’t expected anyone to be executing batch-like code in an on-line environment. At least that’s not something people do under CICS. Unless the use the Entire System Server (NPR) WRITE-FILE view, but that’s different again. Thank you and if you have any further details/insights please share.

---

<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:44pm UTC](https://techcommunity.softwareag.com/t/mainframe-execution-of-external-routines-in-batch-ndv-server-from-naturalone/207550/4 "2021-04-02T15:44:21Z")

</div>


