When the interface
view engine is called to examine additional
ADABAS records in order to add a new periodic group occurrence,
the engine must decide whether to add a new logical record or modify
an existing one. The purpose is to reduce data redundancy.
You can help in the
resolution of this decision by specifying a BY key. You can specify
BY keys in the access descriptor by using the KEY statement. If ASSIGN
NAMES=NO, you can use the KEY statement to specify BY keys in the
view descriptor. Only elementary data fields that are designated
as
ADABAS descriptors can
be specified as BY keys.
A BY key is a set of
match variables. A data field is a good candidate for a BY key if
it uniquely identifies a logical record.
A BY key is similar
to a BY group in SAS, which groups observations based on one or more
fields. Many SAS procedures process records in BY groups. Also,
some updates in the DATA step are performed by matching specified
BY variables in different data sets. A similar matching process occurs
with BY key data fields in the
SAS/ACCESS interface to
ADABAS.
The BY key comparison
process is as follows:
-
If values for a BY key
match a record already in the
ADABAS file, it is modified. That is, the interface view engine inserts
a new occurrence within a periodic group.
-
If values for a BY key
do not match an existing record, a new record is added to the
ADABAS file.