5.14 When I do a FORM SETS command from QUERY on one of my databases it shows a dataset with a negative number of entries. How can this be?

When you see negative numbers in something like a FORM SETS it's because someone, in an attempt to recover from some sort of failure, restored only some of the datasets rather than the entire database. In this case there had probably been a dataset capacity change.

Many people are surprised to find out that IMAGE does not keep the entry count for each dataset anywhere within the database. The entry count for a given dataset is actually the result of subtracting the FREE entry count (kept in the dataset's userlabel) from the dataset's capacity which is in the root file.

If you have a dataset with a capacity of 5000 and 3000 entries within the dataset, the free entry count is 2000. Someone changes the capacity to 10,000 and the free entry count is changed to 7000. If someone else were to restore the OLD root file, then IMAGE/DBINFO/QUERY would report the number of entries as -2000 because 5000 - 7000 = -2000.

Note that both Adager and DBGeneral can detect and correct these problems.