# Identify obsolete online natural programs

**URL:** <https://techcommunity.softwareag.com/t/identify-obsolete-online-natural-programs/76566>\
**Category:** Forum\
**Tags:** Adabas-Natural, Natural, Natural-on-Mainframes\
**Created:** [April 17, 2008, 6:34pm UTC](https://techcommunity.softwareag.com/t/identify-obsolete-online-natural-programs/76566 "2008-04-17T18:34:26Z")\
**Posts on this page:** 11\
**Page:** 1

<div class="post-metadata">

**Author:** ![Sridevi](https://avatars.discourse-cdn.com/v4/letter/s/7bcc69/32.png) [@Sridevi](https://techcommunity.softwareag.com/u/Sridevi)\
**Post date:** [April 17, 2008, 6:34pm UTC](https://techcommunity.softwareag.com/t/identify-obsolete-online-natural-programs/76566/1 "2008-04-17T18:34:26Z")

</div>

Can anyone tell me the procedure to identify the obsolete online natural programs existing in all the libraries.

Thanks in advance

Regards  
Sridevi

---

<div class="post-metadata">

**Author:** ![Brian\_Johnson1](https://sea1.discourse-cdn.com/techcommunity/user_avatar/techcommunity.softwareag.com/brian_johnson1/32/163_2.png) [@Brian\_Johnson1](https://techcommunity.softwareag.com/u/Brian_Johnson1)\
**Post date:** [April 18, 2008, 1:48am UTC](https://techcommunity.softwareag.com/t/identify-obsolete-online-natural-programs/76566/2 "2008-04-18T01:48:22Z")

</div>

Hi Sridevi,

You may wish to implement some kind of NATRDC exit to capture library & program name of every program loaded into the Natural program buffer and store this over a period of time (ensure you run this through year-end to capture programs only run once a year).

Then you should be able to get a list of programs that aren’t run by comparing your set of all objects to this list.

---

<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:** [April 18, 2008, 2:37pm UTC](https://techcommunity.softwareag.com/t/identify-obsolete-online-natural-programs/76566/3 "2008-04-18T14:37:16Z")

</div>

> [@Brian Johnson](#):
>
> You may wish to implement some kind of NATRDC exit to capture library & program name of every program loaded into the Natural program buffer and store this over a period of time

Will you get LDAs/PDAs/Copycodes this way? AFAIK natural doesn’t need LDAs at runtime…

---

<div class="post-metadata">

**Author:** ![Wilfried\_B](https://sea1.discourse-cdn.com/techcommunity/user_avatar/techcommunity.softwareag.com/wilfried_b/32/83_2.png) [@Wilfried\_B](https://techcommunity.softwareag.com/u/Wilfried_B)\
**Post date:** [May 6, 2008, 5:38pm UTC](https://techcommunity.softwareag.com/t/identify-obsolete-online-natural-programs/76566/4 "2008-05-06T17:38:55Z")

</div>

You can use PREDICT xref (L X) for this purpose: Create a list of objects not used/called. All these objects are candidates for deletion. Then you should create a list of all objects calling other objects dynamically (\*DYNAMIC in L X listings) and analyze these objects for calling any of the deletion candidates.

You should repeat this for all libraries with different steplib pathes.

---

<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 8, 2008, 1:09pm UTC](https://techcommunity.softwareag.com/t/identify-obsolete-online-natural-programs/76566/5 "2008-05-08T13:09:24Z")

</div>

[quote="Wilfried B

---

<div class="post-metadata">

**Author:** ![Wilfried\_B](https://sea1.discourse-cdn.com/techcommunity/user_avatar/techcommunity.softwareag.com/wilfried_b/32/83_2.png) [@Wilfried\_B](https://techcommunity.softwareag.com/u/Wilfried_B)\
**Post date:** [July 14, 2008, 6:10pm UTC](https://techcommunity.softwareag.com/t/identify-obsolete-online-natural-programs/76566/6 "2008-07-14T18:10:31Z")

</div>

For example L X VERIFY PROG REFERENCES (\*)

---

<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:** [July 15, 2008, 12:17pm UTC](https://techcommunity.softwareag.com/t/identify-obsolete-online-natural-programs/76566/7 "2008-07-15T12:17:28Z")

</div>

[quote="Wilfried B

---

<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:** [July 15, 2008, 12:49pm UTC](https://techcommunity.softwareag.com/t/identify-obsolete-online-natural-programs/76566/8 "2008-07-15T12:49:20Z")

</div>

> [@Matthias](#):
>
> Maybe I have to do some configurations???

I read the documentation and did a consistency check. We got many many inconsistencies (“Xref invalid”). Don’t ask my why…

[http://techcommunity.softwareag.com/ecosystem/documentation/natural/prd452/reference/natxref\_verify\_9.htm#Verify\_Consistency](http://techcommunity.softwareag.com/ecosystem/documentation/natural/prd452/reference/natxref_verify_9.htm#Verify_Consistency)

---

<div class="post-metadata">

**Author:** ![Douglas\_Kelly](https://sea1.discourse-cdn.com/techcommunity/user_avatar/techcommunity.softwareag.com/douglas_kelly/32/102_2.png) [@Douglas\_Kelly](https://techcommunity.softwareag.com/u/Douglas_Kelly)\
**Post date:** [July 17, 2008, 10:20pm UTC](https://techcommunity.softwareag.com/t/identify-obsolete-online-natural-programs/76566/9 "2008-07-17T22:20:45Z")

</div>

You can also check on the active monitoring tools such as REVIEW (from Software AG) - they can track which programs are actually called from Adabas command monitoring. Of course, you have to monitor the activity over a period (often a year) to ensure that all active modules are invoked, including those only used for annual processes.

A combination of XREF information and monitoring can probably yield more accurate results than either used alone.

Matthias - if your XREF is invalid, is XREF ON where modules are catalogued? Inconsistent XREF usually indicates that the source/object were saved/catalogued without XREF. Turn on XREF and do a CATALL to correct it, then make sure XREF is ON by default (through Natural Security profiles or NATPARMs)

A trick to XREF modules that are called dynamically is to add a dummy subroutine (or false condition) -  
DEFINE SUBROUTINE XREF\_DYNAMICS /\* never PERFORMed  
CALLNAT ‘MYSUBPRG’  
CALLNAT ‘YRSUBPRG’  
FETCH ‘MYPROG’  
FETCH ‘YRPROG’  
END-SUBROUTINE  
…  
CALLNAT #field  
FETCH #field

---

<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:** [July 21, 2008, 11:49am UTC](https://techcommunity.softwareag.com/t/identify-obsolete-online-natural-programs/76566/10 "2008-07-21T11:49:00Z")

</div>

> [@Douglas Kelly](#):
>
> You can also check on the active monitoring tools such as REVIEW (from Software AG)

Is this product available for Open Systems as well?

> [@](#):
>
> Matthias - if your XREF is invalid, is XREF ON where modules are catalogued?

Yes, but our service provider obviously did an ftouch for all Modules last month… We think, that’s the reason. In fact we did a catall afterwards, but it seems that only a STOW helps.

> [@](#):
>
> A trick to XREF modules that are called dynamically is to add a dummy subroutine (or false condition)

Of course I thought about that but that’s not a really proper way … IMHO, special command lines would be better.

---

<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:49pm UTC](https://techcommunity.softwareag.com/t/identify-obsolete-online-natural-programs/76566/11 "2021-04-02T14:49:22Z")

</div>


