Blazanor
Blazanor

Reputation: 175

NAT3176 Error in call to Adabas subroutine or in inverted list

I am having trouble figuring out how to fix this error in Natural Adabas. I am just starting out with Natural on a very old version and the problem I keep running into trying to run most of the existing programs written by previous developers is that I keep getting this error.

NAT3176 Error in call to Adabas subroutine or in inverted list.

So I have attempted a very basic program of my own with the same result (see below). Does anybody know how to resolve this problem or what steps can be taken to debug?

My first thought is that the STUD list does not exist even though there is a DDM for it. Is there a way I could verify that it exists?

My test program is as follows:

0010 DEFINE DATA
0020 LOCAL
0030  1 STUD-VIEW VIEW OF STUD
0040    2 STUDNO
0050 END-DEFINE
0060 READ STUD-VIEW BY STUDNO
0070 DISPLAY STUDNO
0080 END-READ
0090 END

Upvotes: 2

Views: 245

Answers (1)

Dave The Dane
Dave The Dane

Reputation: 869

NAT3176: Inconsistency detected in an inverted list.
That's what the docs say, so very likely the Index ("inverted list") is corrupt.
You'll certainly need your Admin to fix that.

Try omitting the BY STUDNO from the READ Statement.
It will then perform a READ PHYSICAL ("Full Table Scan" in a relational DB) which accesses the data without using the index.

That would look something like this:

DEFINE DATA
    LOCAL 1     STUD-VIEW  VIEW OF STUD
           2    STUDNO
END-DEFINE
*
READ STUD-VIEW
    DISPLAY STUDNO
END-READ
END

Upvotes: 0

Related Questions