If you do not specify
a WHERE clause or any sorting criteria, the type of
ADABAS commands used for retrievals is controlled
by the type of access (either sequential or random) required by the
SAS procedure. A SAS procedure requiring sequential access (for example,
PROC PRINT) results in the engine issuing L2 commands to retrieve
the records from the
ADABAS file. Since there is no WHERE clause to subset the data, the engine
retrieves every
ADABAS record.
A SAS procedure requiring
random access (for example, PROC FSEDIT) must have the ability to
navigate both forward and backward. To support forward and backward
navigation, an ISN list must exist. When a WHERE clause has not been
entered, the engine generates a default WHERE clause. The engine
searches for the first
ADABAS descriptor data field in the view descriptor. Once the engine
finds an
ADABAS descriptor
field, its format and length are used to construct a default WHERE
clause. (If no
ADABAS descriptors
exist, the engine displays an error message.)
The
ADABAS field formats and their corresponding
default WHERE clause are listed below (assuming that the data field
named AA is the first
ADABAS descriptor field):
ADABAS Field Formats and Corresponding Default WHERE Clauses
|
|
|
|
|
where (aa <= 0) or
(aa > 0)
|
|
|
|
|
|
|
|
|
The default WHERE clause
results in the
ADABAS interface
view engine issuing S1 and S8 commands. Those commands generate an
ISN list whose corresponding records are read using L1 or L4 commands.
The engine uses L4 commands if the SAS procedure is capable of performing
updates (that is, PROC FSEDIT). The engine uses L1 commands if the
SAS procedure is not allowed to perform updates (that is, PROC FSBROWSE).
Note: A default WHERE clause can
use considerable resources, depending on the number of
ADABAS records. Therefore, for large amounts
of
ADABAS data, it is best
to include either a view WHERE clause or a SAS WHERE clause. Also,
the ADBDEFW systems option and ADBL3 data set option are available
to alter the interface view engine's handling of the default WHERE
clause. A default WHERE clause might also be issued for an
ADABAS descriptor that has the
NULL SUPPRESS option. That is,
ADABAS records might exist that are not pointed to by the
ISN list.