# NEED SOLUTION

**URL:** <https://techcommunity.softwareag.com/t/need-solution/75498>\
**Category:** Forum\
**Tags:** Adabas-Natural, Natural, Natural-Code-Samples\
**Created:** [October 12, 2007, 2:53pm UTC](https://techcommunity.softwareag.com/t/need-solution/75498 "2007-10-12T14:53:39Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![prakash3](https://avatars.discourse-cdn.com/v4/letter/p/9f8e36/32.png) [@prakash3](https://techcommunity.softwareag.com/u/prakash3)\
**Post date:** [October 12, 2007, 2:53pm UTC](https://techcommunity.softwareag.com/t/need-solution/75498/1 "2007-10-12T14:53:39Z")

</div>

Hi All  
i’m getting following error, please let me know the reason.

NAT3047 Maximum value for Adabas parm NISNHQ exceeded. DB/FNR 6/

NAT9978 Error occurred during execution/compilation.

---

<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:** [October 12, 2007, 3:54pm UTC](https://techcommunity.softwareag.com/t/need-solution/75498/2 "2007-10-12T15:54:09Z")

</div>

You have exceeded the number of “held” records allowed by the parm NISNHQ.

You probably have some bad code like:

READ view in physical sequence  
:::  
IF some condition  
:::  
UPDATE  
END-IF

Assume there are 5 million records in the file, but only ten records pass the IF. You might think that you are only “holding” ten records; WRONG.

As coded above, you would hold every record.

A proper solution might be (depending on what you are actually doing):

RDA. READ view in physical sequence  
:::  
IF some condition  
:::  
GETR. GET (…) \*ISN  
UPDATE GETR.  
END TRANSACTION  
END-IF

A Natural class which also covers Adabas basics is essential if you intend to write Natural programs which access Adabas files.

steve

---

<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:** [October 12, 2007, 3:58pm UTC](https://techcommunity.softwareag.com/t/need-solution/75498/3 "2007-10-12T15:58:14Z")

</div>

Forgot to mention, the GET with the parens was to indicate you might use the same view as the READ, or another View.

Again, this would depend on what you were doing. If only one field was required for the IF, but many fields required for the UPDATE, you might want to use two views; if the same fields were required regardless of whether an UPDATE is issued, you might use one view.

steve

---

<div class="post-metadata">

**Author:** ![prakash3](https://avatars.discourse-cdn.com/v4/letter/p/9f8e36/32.png) [@prakash3](https://techcommunity.softwareag.com/u/prakash3)\
**Post date:** [October 12, 2007, 4:20pm UTC](https://techcommunity.softwareag.com/t/need-solution/75498/4 "2007-10-12T16:20:52Z")

</div>

thanks steve its working fine now.😃

---

<div class="post-metadata">

**Author:** ![Jerome\_LeBlanc](https://sea1.discourse-cdn.com/techcommunity/user_avatar/techcommunity.softwareag.com/jerome_leblanc/32/111_2.png) [@Jerome\_LeBlanc](https://techcommunity.softwareag.com/u/Jerome_LeBlanc)\
**Post date:** [October 12, 2007, 8:04pm UTC](https://techcommunity.softwareag.com/t/need-solution/75498/5 "2007-10-12T20:04:01Z")

</div>

I would be very careful about doing an update within a READ PHYSICAL loop. If your update makes the record longer and it does not fit on disk storage where it came from it can get moved and you might end up reading the same record again later.

---

<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:48pm UTC](https://techcommunity.softwareag.com/t/need-solution/75498/6 "2021-04-02T14:48:48Z")

</div>


