SAS procedures can access
records in a
CA-Datacom/DB table by referring to a view descriptor with the DATA= option. SAS examines the
view descriptor to determine which
database management system is referred to and passes control to the appropriate engine. The interface view
engine uses information stored in the view descriptor (for example, field name, data
type,
key, level, and occurs specifications) to process
CA-Datacom/DB data records as if they were rows in a SAS data file.
Before doing any retrievals, the engine processes the WHERE clause (if any) to select
a subset of data records that are to
be processed as rows. The engine constructs the selection criteria from the view
WHERE clause and the SAS WHERE clause (if any). If no WHERE clauses exist, all data
records in the table qualify.
The interface view engine forms a SAS row (according to the view descriptor), which
it passes back to the calling procedure for processing.
Based on the capabilities of the SAS procedure, the next call to the engine might
be a request to update or delete the SAS row that was just retrieved. For
updates, the engine issues UPDAT, ADDIT, and DELET commands for the data records.
Typically, the SAS procedure then calls the engine again to retrieve another SAS row.
If so, the engine locates another data record, constructs another SAS row, and returns
it to the SAS procedure. This cycle continues until the SAS procedure terminates
or until the last qualified SAS row has been constructed and returned to the SAS procedure.