# How do I run a Natural program through a server hosted in an offline environment?

**URL:** <https://techcommunity.softwareag.com/t/how-do-i-run-a-natural-program-through-a-server-hosted-in-an-offline-environment/312577>\
**Category:** Forum\
**Tags:** Adabas-Natural, Adabas, Natural\
**Created:** [September 23, 2026, 4:02am UTC](https://techcommunity.softwareag.com/t/how-do-i-run-a-natural-program-through-a-server-hosted-in-an-offline-environment/312577 "2026-09-23T04:02:35Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![YKTan](https://avatars.discourse-cdn.com/v4/letter/y/74df32/32.png) [@YKTan](https://techcommunity.softwareag.com/u/YKTan)\
**Post date:** [September 23, 2026, 4:02am UTC](https://techcommunity.softwareag.com/t/how-do-i-run-a-natural-program-through-a-server-hosted-in-an-offline-environment/312577/1 "2026-09-23T04:02:35Z")

</div>

Hello, I am currently trying to create a simple in-house webpage which enables company employees to **access/run a program through an offline server network**.

I have attempted to, through a function in a HTML page, run a .bat file with the following command:

path C:\\Program Files\Software AG\Natural\6.3\Bin

naturalr.exe PARM=[Library Name]

exit

However, I was prevented from doing so due to ActiveXObject (in the aforementioned function) being blocked, as it is identified as a security hazard. With that being the case, may I ask if there are some other ways to fulfill my initial objective?

The solution does not necessarily have to involve .bat files. But if it does, may I also ask how should I modify the above command so that is runs a specific program in a specific library, rather than simply just accessing a library?

---

<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:** [September 24, 2026, 7:09pm UTC](https://techcommunity.softwareag.com/t/how-do-i-run-a-natural-program-through-a-server-hosted-in-an-offline-environment/312577/2 "2026-09-24T19:09:03Z")

</div>

To execute program _yourpgm_ from library _yourlib_, change your Natural command to

```auto
natural.exe batchmode parm=yourparm stack=(logon yourlib;yourpgm;fin) bmtime=on natlog=all

```

The PARM keyword specifies a Natural parameter file created and maintained by the Natural Configuration utility.

You may need to customize the input for the individual user.  
Option 1: See the STACK parameter in the documentation. You can specify INPUT data with a colon.

```auto
stack=(logon yourlib;yourpgm:yourdata;fin)

```

Option 2: You can create an input stream similar to what would be used on the mainframe.

```auto
set cmsynin=fully.qualified.temp.input
echo logon yourlib > %cmsynin%
echo yourpgm >> %cmsynin%
echo yourdata >> %cmsynin%
echo fin >> %cmsynin%

natural.exe batchmode parm=yourparm bmtime=on natlog=all ^
            cmsynin="%cmsynin%" ^
            cmobjin="%cmsynin%"

del %cmsynin%

```

If your program creates print and/or WORK files

```auto
natural.exe batchmode parm=yourparm bmtime=on natlog=all ^
            cmsynin="%cmsynin%" ^
            cmobjin="%cmsynin%" ^
            cmprint="fully.qualified.youruser.cmprint.prt" ^
            cmwrk01="fully.qualified.youruser.work01.txt"

```

---

<div class="post-metadata">

**Author:** ![YKTan](https://avatars.discourse-cdn.com/v4/letter/y/74df32/32.png) [@YKTan](https://techcommunity.softwareag.com/u/YKTan)\
**Post date:** [September 29, 2026, 6:38am UTC](https://techcommunity.softwareag.com/t/how-do-i-run-a-natural-program-through-a-server-hosted-in-an-offline-environment/312577/3 "2026-09-29T06:38:24Z")

</div>

Thank you for replying, Ralph. May I ask if you can provide a simple, laymen example(s)/explanation(s) instead? I’m quite inexperienced with .bat, so I could not quite understand what to do with these separate chunks of code… Sorry for the inconvenience.

Also, since your solution is in .bat, do you have any suggestions on how to implement it into a webpage? If that’s not possible, do you have an **alternate solution other than .bat**?

---

<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:** [October 9, 2026, 7:33am UTC](https://techcommunity.softwareag.com/t/how-do-i-run-a-natural-program-through-a-server-hosted-in-an-offline-environment/312577/4 "2026-10-09T07:33:20Z")

</div>

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