# setting return code in natural

**URL:** <https://techcommunity.softwareag.com/t/setting-return-code-in-natural/61153>\
**Category:** Forum\
**Tags:** Adabas-Natural, Natural, Natural-on-Mainframes\
**Created:** [June 22, 2006, 4:46pm UTC](https://techcommunity.softwareag.com/t/setting-return-code-in-natural/61153 "2006-06-22T16:46:27Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![cooolguyin](https://avatars.discourse-cdn.com/v4/letter/c/e8c25b/32.png) [@cooolguyin](https://techcommunity.softwareag.com/u/cooolguyin)\
**Post date:** [June 22, 2006, 4:46pm UTC](https://techcommunity.softwareag.com/t/setting-return-code-in-natural/61153/1 "2006-06-22T16:46:27Z")

</div>

Is it possible to set a return code in the natural program. For example in cobol program if we move ‘9999’ to return-code register, the return code for that program is set as ‘9999’. This we can use for validating the condition code in the JCL. Do we have similar thing in Natural.

---

<div class="post-metadata">

**Author:** ![Matthias1](https://avatars.discourse-cdn.com/v4/letter/m/9fc348/32.png) [@Matthias1](https://techcommunity.softwareag.com/u/Matthias1)\
**Post date:** [June 22, 2006, 4:51pm UTC](https://techcommunity.softwareag.com/t/setting-return-code-in-natural/61153/2 "2006-06-22T16:51:03Z")

</div>

The [Natural Documentation for Mainframes](http://techcommunity.softwareag.com/ecosystem/documentation/natural/nat421mf/sm/terminat_1330.htm) says:

> [@](#):
>
> TERMINATE [operand1 [operand2]]  
> …  
> operand1 may be used to pass a return code to the program receiving control when Natural terminates. For example, a return code setting may be passed to the operating system via Register 15.
> 
> The value supplied for operand1 must be in the range 0 - 255.

---

<div class="post-metadata">

**Author:** ![cooolguyin](https://avatars.discourse-cdn.com/v4/letter/c/e8c25b/32.png) [@cooolguyin](https://techcommunity.softwareag.com/u/cooolguyin)\
**Post date:** [June 22, 2006, 9:56pm UTC](https://techcommunity.softwareag.com/t/setting-return-code-in-natural/61153/3 "2006-06-22T21:56:43Z")

</div>

Thanks Matthias…

---

<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/setting-return-code-in-natural/61153/4 "2021-04-02T14:40:43Z")

</div>


