# how to find unused object and variable.

**URL:** <https://techcommunity.softwareag.com/t/how-to-find-unused-object-and-variable/97017>\
**Category:** Forum\
**Tags:** Adabas-Natural, Natural, Natural-Add-on-Products, Natural-Other-Addons\
**Created:** [May 9, 2011, 2:47pm UTC](https://techcommunity.softwareag.com/t/how-to-find-unused-object-and-variable/97017 "2011-05-09T14:47:03Z")\
**Posts on this page:** 7\
**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:** [May 9, 2011, 2:47pm UTC](https://techcommunity.softwareag.com/t/how-to-find-unused-object-and-variable/97017/1 "2011-05-09T14:47:03Z")

</div>

can any one tell me,

how to find unused object(subprogramme,subroutine,map,etc.) and unused variable in any programme also.??

is there any utility? will this be natural engineering?

and plz provide me the concept of natural engineering under CICS.

if possible then provide me the exact natural code.

---

<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:** [May 9, 2011, 4:24pm UTC](https://techcommunity.softwareag.com/t/how-to-find-unused-object-and-variable/97017/2 "2011-05-09T16:24:28Z")

</div>

> [@swan](#):
>
> how to find unused object(subprogramme,subroutine,map,etc.)

you can do this using Predict (which is a natural add-on).

The regarding dialog looks like this:

```auto

 11:38:36 *****P R E D I C T 4.6.1***** 2011-05-09
 Library: MYLIB - Verify References - DBnr: 11 Fnr: 22

                    Code Function

                      D Data areas not referenced
                      V Variables in data area not referenced
                      U Programs with unused data areas
                      C Copycodes not referenced
                      N Error numbers not referenced
                      P Programs not referenced
                      I Programs not impl./ref. starting from one

                Code: ? Save set: N (Y,N)
           Data area: Data area type : (?)
        Program type: (?)
             Program:

Command ==>
Enter-PF1---PF2---PF3---PF4---PF5---PF6---PF7---PF8---PF9---PF10--PF11--PF12---
      Invp GDAV Quit Sets Rule Copy Xref View OSet SPfk Main Exit

 
```

---

<div class="post-metadata">

**Author:** ![Sandy15\_Sivva](https://avatars.discourse-cdn.com/v4/letter/s/7bcc69/32.png) [@Sandy15\_Sivva](https://techcommunity.softwareag.com/u/Sandy15_Sivva)\
**Post date:** [May 30, 2011, 1:35pm UTC](https://techcommunity.softwareag.com/t/how-to-find-unused-object-and-variable/97017/3 "2011-05-30T13:35:37Z")

</div>

Hi Matthias,

When I opened the Predict Menu I am getting the below. I didn’t find the menu ‘Verify References’. If you could post the detailed path on how to traverse to that menu it will be helpful.

07:43:37 \*\*\*\*\* P R E D I C T 4.6.1 \*\*\*\*\* 2011-05-30  
Plan 0 - Function Main Menu - Profile SYSTEM

```
   Documentation External objects                     
                                                                           
   A Active retrieval F File implementation               
   M Maintenance G Generation                        
   R Retrieval I Incorporation                     
   X List xref for 3GL C Comparison                        
                                      L Administration                    
                                                                           
   DDA services Miscellaneous                        
                                                                           
   D Defaults W What is new ?                     
   S Special functions ? Help system                       
                                      . Leave Predict                     

```

Function …  
Object type …\* Menu type …\* F

Thanks in advance

---

<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:** [May 31, 2011, 4:47am UTC](https://techcommunity.softwareag.com/t/how-to-find-unused-object-and-variable/97017/4 "2011-05-31T04:47:40Z")

</div>

Actually, you access this Predict function fron Natural:

1. List Xref
2. A (Verify Application)
3. R (Objects implemented but not referenced)

---

<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:** [May 31, 2011, 8:36pm UTC](https://techcommunity.softwareag.com/t/how-to-find-unused-object-and-variable/97017/5 "2011-05-31T20:36:08Z")

</div>

Hi andy15 Sivva!

What you did looks like

```auto
Logon SYSDIC
Menu
```

To get the Xref-Menu you have to go another way - like Peter Holmick said:

```auto
logon *YOURLIB*
l x
```

---

<div class="post-metadata">

**Author:** ![Karlheinz\_Kronauer](https://sea1.discourse-cdn.com/techcommunity/user_avatar/techcommunity.softwareag.com/karlheinz_kronauer/32/134_2.png) [@Karlheinz\_Kronauer](https://techcommunity.softwareag.com/u/Karlheinz_Kronauer)\
**Post date:** [June 18, 2012, 11:06am UTC](https://techcommunity.softwareag.com/t/how-to-find-unused-object-and-variable/97017/6 "2012-06-18T11:06:09Z")

</div>

You also can find unused variables using the NatStyle utility in NaturalONE  
best regards karlheinz

---

<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:00pm UTC](https://techcommunity.softwareag.com/t/how-to-find-unused-object-and-variable/97017/7 "2021-04-02T15:00:12Z")

</div>


