# How can I know if any DDM is no longer used

**URL:** <https://techcommunity.softwareag.com/t/how-can-i-know-if-any-ddm-is-no-longer-used/227841>\
**Category:** Forum\
**Tags:** Adabas-Natural, Natural, Natural-on-Mainframes\
**Created:** [June 18, 2020, 9:38pm UTC](https://techcommunity.softwareag.com/t/how-can-i-know-if-any-ddm-is-no-longer-used/227841 "2020-06-18T21:38:58Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![Fernando\_Zarazua\_Vilchis1](https://sea1.discourse-cdn.com/techcommunity/user_avatar/techcommunity.softwareag.com/fernando_zarazua_vilchis1/32/852_2.png) [@Fernando\_Zarazua\_Vilchis1](https://techcommunity.softwareag.com/u/Fernando_Zarazua_Vilchis1)\
**Post date:** [June 18, 2020, 9:38pm UTC](https://techcommunity.softwareag.com/t/how-can-i-know-if-any-ddm-is-no-longer-used/227841/1 "2020-06-18T21:38:58Z")

</div>

How can I know if any DDM is no longer used, unfortunately I don’t have Predict. there is some other way of knowing.?

I work in Mainframe Z/OS  
ADA 8.2 SP 6  
NATURAL 8.4.6

The mission is to eliminate DDMs that are not used, and FDTs that are not useful.

---

<div class="post-metadata">

**Author:** ![Ralph\_Zbrog](https://sea1.discourse-cdn.com/techcommunity/user_avatar/techcommunity.softwareag.com/ralph_zbrog/32/78_2.png) [@Ralph\_Zbrog](https://techcommunity.softwareag.com/u/Ralph_Zbrog)\
**Post date:** [June 19, 2020, 11:38pm UTC](https://techcommunity.softwareag.com/t/how-can-i-know-if-any-ddm-is-no-longer-used/227841/2 "2020-06-19T23:38:47Z")

</div>

DDMs are used at compile time. To use a DDM, there must be a reference to it embedded in a GDA, LDA, or programming object, so scan your FUSER source code for each DDM name.

---

<div class="post-metadata">

**Author:** ![Steve\_Robinson](https://sea1.discourse-cdn.com/techcommunity/user_avatar/techcommunity.softwareag.com/steve_robinson/32/107_2.png) [@Steve\_Robinson](https://techcommunity.softwareag.com/u/Steve_Robinson)\
**Post date:** [June 20, 2020, 11:06am UTC](https://techcommunity.softwareag.com/t/how-can-i-know-if-any-ddm-is-no-longer-used/227841/3 "2020-06-20T11:06:24Z")

</div>

The problem is what you mean by “eliminate DDMs that are not used,”. I am guessing that you not only want to eliminate DDMs that do not physically exist in code, but also want to eliminate DDMs that physically exist but are never used.

The latter would be quite time consuming and tedious. It would involve, for example, first looking for the DDMs in objects as Ralph mentioned. Then, however, you would have to see if the objects are ever actually executed. Indeed, it gets worse. You could have a DDM in an object (say a subprogram) that is simply never referenced CALLNAT’ed) in the main line of a system, or a DDM in an object that is used in the code, but the logic of the DDM in the object is such that the code that uses the DDM will never be executed.

---

<div class="post-metadata">

**Author:** ![Fernando\_Zarazua\_Vilchis1](https://sea1.discourse-cdn.com/techcommunity/user_avatar/techcommunity.softwareag.com/fernando_zarazua_vilchis1/32/852_2.png) [@Fernando\_Zarazua\_Vilchis1](https://techcommunity.softwareag.com/u/Fernando_Zarazua_Vilchis1)\
**Post date:** [June 23, 2020, 9:48pm UTC](https://techcommunity.softwareag.com/t/how-can-i-know-if-any-ddm-is-no-longer-used/227841/4 "2020-06-23T21:48:48Z")

</div>

Thank Ralph, With the scan tool I search for all the objects that are related to the selected DDM.

---

<div class="post-metadata">

**Author:** ![Fernando\_Zarazua\_Vilchis1](https://sea1.discourse-cdn.com/techcommunity/user_avatar/techcommunity.softwareag.com/fernando_zarazua_vilchis1/32/852_2.png) [@Fernando\_Zarazua\_Vilchis1](https://techcommunity.softwareag.com/u/Fernando_Zarazua_Vilchis1)\
**Post date:** [June 23, 2020, 9:58pm UTC](https://techcommunity.softwareag.com/t/how-can-i-know-if-any-ddm-is-no-longer-used/227841/5 "2020-06-23T21:58:37Z")

</div>

ok thanks Steve, for your valuable advice, what I am going to do is first with ADAREP I check the DATE-OF-LAST-UPDATE field, if the last record update date is already very old, I select ADABAS FILE (FNR) and I look for its associated DDM, with the SCAN tool of NATURAL I look for all its objects linked to that DDM, later I am going to Block the file, and if it does not receive updates or queries I proceed to delete FDT, DDM and programming objects. I would like to know your comments about it. Thank you.

---

<div class="post-metadata">

**Author:** ![Steve\_Robinson](https://sea1.discourse-cdn.com/techcommunity/user_avatar/techcommunity.softwareag.com/steve_robinson/32/107_2.png) [@Steve\_Robinson](https://techcommunity.softwareag.com/u/Steve_Robinson)\
**Post date:** [June 25, 2020, 10:26am UTC](https://techcommunity.softwareag.com/t/how-can-i-know-if-any-ddm-is-no-longer-used/227841/6 "2020-06-25T10:26:33Z")

</div>

Hi Fernando;

Plan looks good.

However, one thing you might watch out for are “table files” which could go years without updates, but are constantly in use.

Also, something to watch out for. Suppose you find a file that has not been updated for awhile. You create a list of objects that use the matching DDM(s). Now you block the file. No one seems to care that the file is blocked. So far, so good. HOWEVER, before you get rid of any objects, you should manually read through the objects. It may be that the object uses several files. However, the part of the object that references the file is never executed. You cannot safely delete the object, because it is used frequently, and will function properly since the file you want to get rid of is never referenced. This can be a tedious task. You may have to comment out code and test after STOWing the object.

good luck.

---

<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:44pm UTC](https://techcommunity.softwareag.com/t/how-can-i-know-if-any-ddm-is-no-longer-used/227841/7 "2021-04-02T15:44:49Z")

</div>


