# how to kill a running natural program

**URL:** <https://techcommunity.softwareag.com/t/how-to-kill-a-running-natural-program/74987>\
**Category:** Forum\
**Tags:** Adabas-Natural, Natural, Natural-on-Mainframes\
**Created:** [July 7, 2007, 1:12am UTC](https://techcommunity.softwareag.com/t/how-to-kill-a-running-natural-program/74987 "2007-07-07T01:12:08Z")\
**Posts on this page:** 14\
**Page:** 1

<div class="post-metadata">

**Author:** ![virtuesplea](https://avatars.discourse-cdn.com/v4/letter/v/779978/32.png) [@virtuesplea](https://techcommunity.softwareag.com/u/virtuesplea)\
**Post date:** [July 7, 2007, 1:12am UTC](https://techcommunity.softwareag.com/t/how-to-kill-a-running-natural-program/74987/1 "2007-07-07T01:12:08Z")

</div>

I’m pretty new to Natural and ADABAS. Administrative functions for the mainframe are divided among many people where I work. But in order to test the Broker interface between a Natural and VB program, I need to start the Natural program. I am not able to access the mainframe’s command line to actually kill the program’s process. And the only hint I’ve gotten on how to kill a running Natural program from the Program Editor is “%” or “%%”. But neither of those two commands work if I have no input fields.  
So, besides contacting the system administrator, is there any way that I can kill a Natural program that I’ve started running from the Program Editor?

Thanks in advance for your help.

---

<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:** [July 7, 2007, 3:01am UTC](https://techcommunity.softwareag.com/t/how-to-kill-a-running-natural-program/74987/2 "2007-07-07T03:01:33Z")

</div>

Depending upon your TP monitor, the CANCEL key may work for you. The location of the CANCEL key on the keyboard varies with terminal emulators, but is often at the top left of the keyboard, marked Esc.

The CANCEL key returns control to the keyboard, whereupon you enter %. or %%.

---

<div class="post-metadata">

**Author:** ![virtuesplea](https://avatars.discourse-cdn.com/v4/letter/v/779978/32.png) [@virtuesplea](https://techcommunity.softwareag.com/u/virtuesplea)\
**Post date:** [July 9, 2007, 7:13pm UTC](https://techcommunity.softwareag.com/t/how-to-kill-a-running-natural-program/74987/3 "2007-07-09T19:13:02Z")

</div>

Hmm . . . I tried this today when I got into work. While the CANCEL key (ESC) does work to return control to the keyboard and I can enter the % or %% command (I’ve tried both), once I press Enter, control is again taken away, leading me to believe the process is still running.  
Any more ideas?

Thanks again.

---

<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 9, 2007, 10:21pm UTC](https://techcommunity.softwareag.com/t/how-to-kill-a-running-natural-program/74987/4 "2007-07-09T22:21:05Z")

</div>

The actual “terminal control character” is controlled with the Natural parameter CF, so you might want to check its setting (use the Natural GLOBALS command).

But as you got the hint to use %, chances are high it _is_ the control char.

Secondly, use of terminal control characters may be restricted (Natural Security).

All of this only helps if your Natural program is sitting on a terminal I/O.

Is the Natural program a RPC client or a server program ?

---

<div class="post-metadata">

**Author:** ![virtuesplea](https://avatars.discourse-cdn.com/v4/letter/v/779978/32.png) [@virtuesplea](https://techcommunity.softwareag.com/u/virtuesplea)\
**Post date:** [July 9, 2007, 10:39pm UTC](https://techcommunity.softwareag.com/t/how-to-kill-a-running-natural-program/74987/5 "2007-07-09T22:39:50Z")

</div>

I connect to a mainframe in order to use Natural, usually using EntireX Connection’s Terminal program.

---

<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 9, 2007, 11:00pm UTC](https://techcommunity.softwareag.com/t/how-to-kill-a-running-natural-program/74987/6 "2007-07-09T23:00:59Z")

</div>

Right, but … is your Natural program

- the SERVER, to which you are talking from the VB program

or

- the CLIENT which talks to a VB server program ?

---

<div class="post-metadata">

**Author:** ![virtuesplea](https://avatars.discourse-cdn.com/v4/letter/v/779978/32.png) [@virtuesplea](https://techcommunity.softwareag.com/u/virtuesplea)\
**Post date:** [July 9, 2007, 11:13pm UTC](https://techcommunity.softwareag.com/t/how-to-kill-a-running-natural-program/74987/7 "2007-07-09T23:13:13Z")

</div>

Ah . . . sorry about that. The program acts as the server.

---

<div class="post-metadata">

**Author:** ![virtuesplea](https://avatars.discourse-cdn.com/v4/letter/v/779978/32.png) [@virtuesplea](https://techcommunity.softwareag.com/u/virtuesplea)\
**Post date:** [July 9, 2007, 11:43pm UTC](https://techcommunity.softwareag.com/t/how-to-kill-a-running-natural-program/74987/8 "2007-07-09T23:43:04Z")

</div>

I checked with our sys admin. We do not currently have the permissions to kill our own running processes. )-:

Thanks for the help anyway. Once I manage to convince them that we need to be able to do so, it’ll come in handy.

---

<div class="post-metadata">

**Author:** ![Jerome\_LeBlanc](https://sea1.discourse-cdn.com/techcommunity/user_avatar/techcommunity.softwareag.com/jerome_leblanc/32/111_2.png) [@Jerome\_LeBlanc](https://techcommunity.softwareag.com/u/Jerome_LeBlanc)\
**Post date:** [July 10, 2007, 12:19am UTC](https://techcommunity.softwareag.com/t/how-to-kill-a-running-natural-program/74987/9 "2007-07-10T00:19:19Z")

</div>

Is it possible to pass something to the server through your VB client that would tell it to stop?

---

<div class="post-metadata">

**Author:** ![virtuesplea](https://avatars.discourse-cdn.com/v4/letter/v/779978/32.png) [@virtuesplea](https://techcommunity.softwareag.com/u/virtuesplea)\
**Post date:** [July 10, 2007, 12:20am UTC](https://techcommunity.softwareag.com/t/how-to-kill-a-running-natural-program/74987/10 "2007-07-10T00:20:44Z")

</div>

Now that I know that I can’t kill the process, that is what I plan on doing.

---

<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 10, 2007, 1:04am UTC](https://techcommunity.softwareag.com/t/how-to-kill-a-running-natural-program/74987/11 "2007-07-10T01:04:12Z")

</div>

If you are running a ‘Natural RPC Server’ from the terminal, just

- open a 2nd Natural session,
- logon to library SYSRPC, and, assuming the server is defined there,
- go to XC (command execution) and
- enter ‘TE’ (terminate) for the server to be stopped.

This will stop the server program and free up your terminal.

---

<div class="post-metadata">

**Author:** ![virtuesplea](https://avatars.discourse-cdn.com/v4/letter/v/779978/32.png) [@virtuesplea](https://techcommunity.softwareag.com/u/virtuesplea)\
**Post date:** [July 10, 2007, 1:06am UTC](https://techcommunity.softwareag.com/t/how-to-kill-a-running-natural-program/74987/12 "2007-07-10T01:06:09Z")

</div>

Actually, I can’t do that either. We’re only able to logon once to each natural environment that we have set up (test and production). That’s one more thing both myself and my boss would like to get changed. (-:

---

<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 10, 2007, 3:54pm UTC](https://techcommunity.softwareag.com/t/how-to-kill-a-running-natural-program/74987/13 "2007-07-10T15:54:24Z")

</div>

In that case your only bets are either asking a colleague to stop the server for you (using SYSRPC),  
or, if you are allowed to do that,  
stop it yourself using EntireX Broker Control Center or the System Management Hub (depending on the version of EntireX in use at your site).

---

<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:48pm UTC](https://techcommunity.softwareag.com/t/how-to-kill-a-running-natural-program/74987/14 "2021-04-02T14:48:31Z")

</div>


