# Peform statement

**URL:** <https://techcommunity.softwareag.com/t/peform-statement/175330>\
**Category:** Forum\
**Tags:** Adabas-Natural, Natural, Natural-on-Mainframes\
**Created:** [March 27, 2014, 6:19am UTC](https://techcommunity.softwareag.com/t/peform-statement/175330 "2014-03-27T06:19:48Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![swan](https://sea1.discourse-cdn.com/techcommunity/user_avatar/techcommunity.softwareag.com/swan/32/296_2.png) [@swan](https://techcommunity.softwareag.com/u/swan)\
**Post date:** [March 27, 2014, 6:19am UTC](https://techcommunity.softwareag.com/t/peform-statement/175330/1 "2014-03-27T06:19:48Z")

</div>

Hi All,

I have a query for PERFORM statement.

If we write PERFORM statement in our code and do not define subroutine. The program does not give compilation error but it gives run time error , my question Why it does not give compilation error ?

Thanks,  
Swan

---

<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:** [March 27, 2014, 6:54am UTC](https://techcommunity.softwareag.com/t/peform-statement/175330/2 "2014-03-27T06:54:42Z")

</div>

Hi Swan,

The reason that no error is generated at catalog time is because the compiler is assuming that you want to perform an external subroutine.

At runtime, Natural finds the external subroutine using an internal lookup table that maps the internal long subroutine name to the 8 character module name. The lookup table is updated when the external subroutine is cataloged.

You can RTFM here [http://techcommunity.softwareag.com/ecosystem/documentation/natural/nat823mf/pg/pg\_obj\_prog.htm#Subroutine](http://techcommunity.softwareag.com/ecosystem/documentation/natural/nat823mf/pg/pg_obj_prog.htm#Subroutine) and here [url][http://techcommunity.softwareag.com/ecosystem/documentation/natural/nat823mf/sm/definesu.htm[/url]](http://techcommunity.softwareag.com/ecosystem/documentation/natural/nat823mf/sm/definesu.htm%5B/url%5D) .

Cheers,

Graeme

---

<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:** [March 31, 2014, 3:05pm UTC](https://techcommunity.softwareag.com/t/peform-statement/175330/3 "2014-03-31T15:05:52Z")

</div>

It’s similar to CALLNAT ‘NONEXIST’.  
It results in a runtime error.

---

<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:30pm UTC](https://techcommunity.softwareag.com/t/peform-statement/175330/4 "2021-04-02T15:30:41Z")

</div>


