# CPU % in Natural

**URL:** <https://techcommunity.softwareag.com/t/cpu-in-natural/97474>\
**Category:** Forum\
**Tags:** Adabas-Natural, Natural, Natural-on-Mainframes\
**Created:** [June 20, 2011, 4:57pm UTC](https://techcommunity.softwareag.com/t/cpu-in-natural/97474 "2011-06-20T16:57:04Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![Hezi](https://avatars.discourse-cdn.com/v4/letter/h/a5b964/32.png) [@Hezi](https://techcommunity.softwareag.com/u/Hezi)\
**Post date:** [June 20, 2011, 4:57pm UTC](https://techcommunity.softwareag.com/t/cpu-in-natural/97474/1 "2011-06-20T16:57:04Z")

</div>

Hi,

We encounter a serious cpu usage problem, in some of our batch process.  
I want to find what program cause this overhead cpu usage.  
I know I can use debbuger in batch mode to count statements and to use statistics.  
Is there another utility (maybe sysrdc) to use (we do not have review)?  
How exactly I can use the Test with the above 2 options?

Hezi

---

<div class="post-metadata">

**Author:** ![Finn\_the\_Dane1](https://sea1.discourse-cdn.com/techcommunity/user_avatar/techcommunity.softwareag.com/finn_the_dane1/32/132_2.png) [@Finn\_the\_Dane1](https://techcommunity.softwareag.com/u/Finn_the_Dane1)\
**Post date:** [June 20, 2011, 5:15pm UTC](https://techcommunity.softwareag.com/t/cpu-in-natural/97474/2 "2011-06-20T17:15:34Z")

</div>

If you have Natural Review installed (a very useful add on product!)  
this would be easiest tool to use for this.  
Finn  
See doc of Review herehttp://techcommunity.softwareag.com/ecosystem/documentation/natural/nat427mf/print/rnm\_mf.pdf

---

<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:** [June 20, 2011, 6:04pm UTC](https://techcommunity.softwareag.com/t/cpu-in-natural/97474/3 "2011-06-20T18:04:38Z")

</div>

Yes, SYSRDC is most likely your best bet.

It’ll probably be too much to trace everything, maybe start by tracing P\* events (program load / start / termination),  
The first column of the RDCDISP output (ETIME1) will give you the elapsed time between events.

If this doesn’t sufficiently identify your problem extend your trace options to include database activity etc.

---

<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 21, 2011, 6:10pm UTC](https://techcommunity.softwareag.com/t/cpu-in-natural/97474/4 "2011-06-21T18:10:19Z")

</div>

Just a couple of things to look for:

Adabas file Views in Natural with far more fields than necessary.

Read Work File statements that could easily be Read Work File RECORD statements.

“Silly” array usage. Example, a FOR loop on #LOOP with a statement such as  
MOVE ’ ’ to #ARRAY (#LOOP). Instead, RESET #ARRAY (\*) or, better yet, REDEFINE #ARRAY as #STRING (A whatever), and simply RESET #STRING.

MOVE BY NAME statements where the source and target Groups can be defined as single variables; then MOVE #SOURCE TO #TARGET.

Mixed format arithmetic statements.

Of course, there are many more to consider, but I would be surprised if you did not have some of the above, which are easily improved.

steve

---

<div class="post-metadata">

**Author:** ![Hezi](https://avatars.discourse-cdn.com/v4/letter/h/a5b964/32.png) [@Hezi](https://techcommunity.softwareag.com/u/Hezi)\
**Post date:** [June 26, 2011, 6:09pm UTC](https://techcommunity.softwareag.com/t/cpu-in-natural/97474/5 "2011-06-26T18:09:36Z")

</div>

Hi,

I submit a job with Debug to check “Print statment executaion statistics”.  
Can someone explain me the columns in the printed table?

Hezi

---

<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:** [June 27, 2011, 12:39pm UTC](https://techcommunity.softwareag.com/t/cpu-in-natural/97474/6 "2011-06-27T12:39:47Z")

</div>

Does the documentation give you enough to interpret the output ?

[http://techcommunity.softwareag.com/ecosystem/documentation/natural/nat427mf/utis/rdc.htm#rdc\_Sample\_Programs\_in\_Library\_SYSRDC](http://techcommunity.softwareag.com/ecosystem/documentation/natural/nat427mf/utis/rdc.htm#rdc_Sample_Programs_in_Library_SYSRDC)

If not, can you please post some sample output ?

---

<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/cpu-in-natural/97474/7 "2021-04-02T15:00:27Z")

</div>


