NEED SOLUTION

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.

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

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

thanks steve its working fine now.:smiley:

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.