# Unused Variables

**URL:** <https://techcommunity.softwareag.com/t/unused-variables/61458>\
**Category:** Forum\
**Tags:** Adabas-Natural, Natural, Natural-on-Mainframes, Adabas-Natural-Cloud\
**Created:** [September 19, 2006, 9:21pm UTC](https://techcommunity.softwareag.com/t/unused-variables/61458 "2006-09-19T21:21:16Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Richard](https://avatars.discourse-cdn.com/v4/letter/r/f0a364/32.png) [@Richard](https://techcommunity.softwareag.com/u/Richard)\
**Post date:** [September 19, 2006, 9:21pm UTC](https://techcommunity.softwareag.com/t/unused-variables/61458/1 "2006-09-19T21:21:16Z")

</div>

We are making significant changes to old Natural code that has had its share of programmers over the years and we would like to remove all unused variables. I believe that there is a command to find them.

---

<div class="post-metadata">

**Author:** ![Curtis\_Pew](https://avatars.discourse-cdn.com/v4/letter/c/5f9b8f/32.png) [@Curtis\_Pew](https://techcommunity.softwareag.com/u/Curtis_Pew)\
**Post date:** [September 19, 2006, 10:48pm UTC](https://techcommunity.softwareag.com/t/unused-variables/61458/2 "2006-09-19T22:48:32Z")

</div>

I know of no Natural command for this, but I believe if the programs were compiled with XREF on then the XREF functionality in PRE-DICT might help you.

Personally, I just comment out the suspect variables and then check the program.

---

<div class="post-metadata">

**Author:** ![Helmut\_Spichtinger](https://avatars.discourse-cdn.com/v4/letter/h/e0b2c6/32.png) [@Helmut\_Spichtinger](https://techcommunity.softwareag.com/u/Helmut_Spichtinger)\
**Post date:** [September 20, 2006, 1:36pm UTC](https://techcommunity.softwareag.com/t/unused-variables/61458/3 "2006-09-20T13:36:10Z")

</div>

There’s a self written tool on [www.wizinc.com](http://www.wizinc.com). Click on the button “Library” and a list of tools will be shown. The document Unused.zip contains a natural program to find unused variables in a 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:** [April 2, 2021, 2:40pm UTC](https://techcommunity.softwareag.com/t/unused-variables/61458/4 "2021-04-02T14:40:50Z")

</div>


