SAS procedures can access records in a SYSTEM 2000 database by specifying a view
descriptor in the DATA= option. SAS examines the view descriptor to determine which
database management system is specified and passes control to the appropriate engine. The interface view engine
uses information stored in the view descriptor (for example, access mode, password,
database name,
component numbers, levels, types, and so on) to process SYSTEM 2000 data records as if they
were observations in a SAS data file.
Before performing retrievals, the engine processes a PLEX dynamic
where-clause (if specified) to select a subset of data records that should be processed as observations.
The engine constructs the dynamic where-clause from the view where-clause and the
WHERE clause in SAS (if any). If no view where-clause exists,
a where-clause is constructed to locate all database records.
The dynamic where-clause processing returns a
Locate File that contains the addresses of database records that satisfied the selection criteria.
Based on those addresses, the engine issues a combination of GET S2KCOUNT, GET1, and
GETA commands to read one or more
database records. Then, the engine combines data from the records (according to the
view descriptor) to form a SAS observation that it passes back to the calling procedure
for processing.
Based on the capabilities of the SAS procedure that you are using, the next call to
the engine might be a request to update or delete the SAS observation that was just
retrieved. For updates, the engine issues MODIFY, INSERT, and REMOVE
commands for one or more data records, based on how many records were used to construct
the observation. Then, the SAS procedure calls the engine again to retrieve another
SAS observation. The engine locates another group of records, constructs another SAS
observation, and returns it to the SAS procedure. This cycle continues until the SAS
procedure is terminated or until the last qualified SAS observation has been constructed
and returned to the SAS procedure. The interface view engine also uses other commands,
such as COMMIT, ROLLBACK, and CLEAR, to control processing.