Diagnosing NDBM Problems

A return value of 0 indicates no error. Subroutines that return a negative value indicate an error has occurred. A positive integer return indicates the status of the return. For example, if the dbm_store subroutine, issued with an insert flag, finds an existing entry with the same key, it returns a 1.

The dbm_fetch, dbm_firstkey, and dbm_nextkey subroutines return a datum structure containing the value returned for the specified key. If the subroutine is unsuccessful, a null value is indicated in the dptr field of the datum structure.