Previous: Syntactical Errors, Up: Checking Recfiles

8.2 Semantic Errors

However recfix checks more than the syntactical integrity of the recfile. It also checks certain semantics and that the data is self-consistent. To do this, it uses the special fields of the record, some of which were introduced above (see Constraints on Record Sets). It is a good idea to use the special fields to stipulate the “enterprise rules” of the data.

Errors will be reported if any of the following special keywords are present and the data does not match the stipulated conditions

The mandated fields are missing from a record.
The prohibited fields are present in a record.
There is more than one field in a single record of the given name.
Two or more records share the same value of the field which is the key field.
%typedef and %type
A field has a value which does not conform to the specified type.
The number of records does not conform to the specified restriction.
A field does not conform to the specified constraint.
An unencrypted value exists for a confidential field.