Shitty Code

Check this out. This is verbatim from the API documentation we're dealing with. Financial software is some of the worst code in the world -- you'd have to try to make it this bad. My favorite part of the blurb below is the last sentence.

14.4. Miscellaneous Flags

Each fundamental record includes a flags field. This field has the following definitions:

#define ATFI_FUNDFLAG_DELETE 0x00008000
#define ATFI_FUNDFLAG_VERSION 0xff000000
#define ATFI_FUNDFLAG_ADDBYCHANGE 0x00000001

This specifies that the record has been deleted.

#define ATFI_VERSION 0xff000000

This value is used to retrieve the version of the record.

To create the DBM database number is created with:

SERVDB_FUNDAMENTAL( dataType )