# Last Execution Date of Natural Objects

**URL:** <https://techcommunity.softwareag.com/t/last-execution-date-of-natural-objects/98104>\
**Category:** Forum\
**Tags:** Adabas-Natural, Natural, Natural-on-Mainframes\
**Created:** [August 21, 2011, 8:10pm UTC](https://techcommunity.softwareag.com/t/last-execution-date-of-natural-objects/98104 "2011-08-21T20:10:11Z")\
**Posts on this page:** 13\
**Page:** 1

<div class="post-metadata">

**Author:** ![Min\_Chai](https://avatars.discourse-cdn.com/v4/letter/m/71c47a/32.png) [@Min\_Chai](https://techcommunity.softwareag.com/u/Min_Chai)\
**Post date:** [August 21, 2011, 8:10pm UTC](https://techcommunity.softwareag.com/t/last-execution-date-of-natural-objects/98104/1 "2011-08-21T20:10:11Z")

</div>

I need to find out the last execution date of all the natural objects in my library (programs, maps, subprograms, subroutines, etc). Is this information recorded somewhere in FUSER? My problem is that I do not know when a natural object is being last executed.

Please advise how I can obtain the information I need. Any Natural utilities?

I am using Natural on the mainframe.

Many thanks in advance.

---

<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:** [August 22, 2011, 2:19am UTC](https://techcommunity.softwareag.com/t/last-execution-date-of-natural-objects/98104/2 "2011-08-22T02:19:29Z")

</div>

Natural does not provide this type of historical data. You can query the Buffer Pool for information on the current session, though.

Some shops have built tracking systems, but writing to a log every time an object is called can have a very negative impact on performance.

---

<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:** [August 22, 2011, 3:59pm UTC](https://techcommunity.softwareag.com/t/last-execution-date-of-natural-objects/98104/3 "2011-08-22T15:59:39Z")

</div>

> [@Ralph Zbrog](#):
>
> Natural does not provide this type of historical data. You can query the Buffer Pool for information on the current session, though.

We’ve implemented a bufferpool-history on our Solaris-Box. Every 5 minutes we save a complete listing of the buffer pool. Every evening, we delete all modules from the buffer pool. So we know when an object was called the last time.

---

<div class="post-metadata">

**Author:** ![Min\_Chai](https://avatars.discourse-cdn.com/v4/letter/m/71c47a/32.png) [@Min\_Chai](https://techcommunity.softwareag.com/u/Min_Chai)\
**Post date:** [August 22, 2011, 4:35pm UTC](https://techcommunity.softwareag.com/t/last-execution-date-of-natural-objects/98104/4 "2011-08-22T16:35:50Z")

</div>

Matthias,

Can you elaborate on how you capture the bufferpool information every 5 minutes? Is this a Natural program calling the sysbpm utility that you run infinitely?

I appreciate any detail information.

Min

---

<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:** [August 22, 2011, 5:37pm UTC](https://techcommunity.softwareag.com/t/last-execution-date-of-natural-objects/98104/5 "2011-08-22T17:37:54Z")

</div>

Min Chai,

Is this a one time search for unused objects? Or is there some “real time” use you have in mind for this information.

Matthias,

Do you actually use the bufferpool information to control things like buffer sizes, job scheduling, etc

steve

---

<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:** [August 22, 2011, 6:01pm UTC](https://techcommunity.softwareag.com/t/last-execution-date-of-natural-objects/98104/6 "2011-08-22T18:01:42Z")

</div>

If you implement a NATRDC user exit, it can write out the library & object name of every object loaded into the buffer pool, which can be flushed out to flat file for programmatic loading into a database so that you can retain this information. However, you will need to implement and let this run for a long time in order to know if the objects are run at all or just not very often for those that are missing.

---

<div class="post-metadata">

**Author:** ![Min\_Chai](https://avatars.discourse-cdn.com/v4/letter/m/71c47a/32.png) [@Min\_Chai](https://techcommunity.softwareag.com/u/Min_Chai)\
**Post date:** [August 22, 2011, 6:25pm UTC](https://techcommunity.softwareag.com/t/last-execution-date-of-natural-objects/98104/7 "2011-08-22T18:25:14Z")

</div>

> [@Steve Robinson](#):
>
> Min Chai,
> 
> Is this a one time search for unused objects? Or is there some “real time” use you have in mind for this information.
> 
> Matthias,
> 
> Do you actually use the bufferpool information to control things like buffer sizes, job scheduling, etc
> 
> steve

The ultimate goal is to find out what modules are still being used at runtime. If I were to retrieve the information from bufferpool for this purpose then I would need this process to run for the period of a few months just to cover as wide a basis as possible. Even if I can identify a certain percentage (high I hope) of the modules and manually address the rest that would be fine.

---

<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:** [August 22, 2011, 6:36pm UTC](https://techcommunity.softwareag.com/t/last-execution-date-of-natural-objects/98104/8 "2011-08-22T18:36:27Z")

</div>

Building something around NATRDC is the most reliable way on the mainframe,  
but it isn’t available on OpenSystems, so using the bufferpool information probably  
is the best bet here, however, there’s a risk of missing entries when they are purged  
between intervals.

---

<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:** [August 23, 2011, 12:45am UTC](https://techcommunity.softwareag.com/t/last-execution-date-of-natural-objects/98104/9 "2011-08-23T00:45:22Z")

</div>

Adabas Review ([http://techcommunity.softwareag.com/ecosystem/documentation/adabas/rev452/overview.htm](http://techcommunity.softwareag.com/ecosystem/documentation/adabas/rev452/overview.htm)) can also be used to track Natural module usage and would be more comprehensive than a buffer pool sampling.

---

<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:** [August 23, 2011, 5:33am UTC](https://techcommunity.softwareag.com/t/last-execution-date-of-natural-objects/98104/10 "2011-08-23T05:33:39Z")

</div>

Natural Review ( [http://techcommunity.softwareag.com/ecosystem/documentation/natural/nat427mf/rnm\_mf/rnm\_mf-over.htm](http://techcommunity.softwareag.com/ecosystem/documentation/natural/nat427mf/rnm_mf/rnm_mf-over.htm) ) that is, and it is, like SYSRDC, available for the mainframe only.

---

<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:** [August 23, 2011, 11:59am UTC](https://techcommunity.softwareag.com/t/last-execution-date-of-natural-objects/98104/11 "2011-08-23T11:59:38Z")

</div>

> [@Min Chai](#):
>
> Can you elaborate on how you capture the bufferpool information every 5 minutes? Is this a Natural program calling the sysbpm utility that you run infinitely?

No, it’s all Solaris-stuff. I’m afraid it won’t help you on Mainframe.

It’s a simple cronjob - called every 5 Minutes:

```auto
natbpmon bp=mybp dir k=g > /tmp/nat.monitor.log
natbpmon bp=mybp dir k=s >> /tmp/nat.monitor.log
#
# this perl-script feeds a kind of Bufferpool-database with the content of nat.monitor.log
$HOME/scripts/natbp-monitor.pl
```

---

<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:** [August 23, 2011, 12:06pm UTC](https://techcommunity.softwareag.com/t/last-execution-date-of-natural-objects/98104/12 "2011-08-23T12:06:09Z")

</div>

> [@Steve Robinson](#):
>
> Do you actually use the bufferpool information to control things like buffer sizes, job scheduling, etc

No. We just want to know when a program was used the last time. For example: If you want to change a field length it’s very useful to know which modules are used every day and which one is used only one time a year (e.g. for stock-taking) …

---

<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/last-execution-date-of-natural-objects/98104/13 "2021-04-02T15:00:48Z")

</div>


