Mainframe execution of external routines in batch NDV server from NaturalONE

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!

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

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.