Chapter Contents

Previous

Next
SAS/ACCESS Interface to CA-DATACOM/DB: Reference

Update Processing

Update processing involves updating, deleting, and adding data records. You must retrieve the data record before updating or deleting it.

Adding a new record requires additional processing after the record has been inserted. The position of the new record must be established so the interface view engine can find and display it for interactive online updating. However, a procedure such as the APPEND procedure can avoid the additional processing time for repositioning. If the DDBLOAD= data set option is nonzero, for example, DDBLOAD equals 1, the APPEND procedure loads the data from a SAS file into the CA-DATACOM/DB table with an uninterrupted succession of ADDIT commands. Then you can use a SAS procedure, such as FSEDIT or PRINT, to view the new records.

For more information on the DDBLOAD option, see Data Set Options and System Options.


Repositioning to an Inserted Record

If the Default Key is the Master Key and DUPE-MASTER-KEY is N, repositioning takes place efficiently. Without a WHERE clause, the RDULE command locks the record. The LOCKX command can locate the index entry just added. Subsequent commands move backward and forward, traversing the actual index.

With a WHERE clause, the interface view engine uses the Compound Boolean Selection (CBS) facility instead of directly traversing a permanent database index. After an ADD, the original Select File does not contain the new record; therefore, it issues a LOCKX command, followed by an RDUID command, which allows the engine to keep an internal table of internal record ID numbers. You can return to the new records without reissuing the WHERE clause.

Repositioning is less efficient if the key value is not guaranteed to be unique. The interface view engine tries to retrieve the newly added record by issuing a SELFR command containing a WHERE clause that comprises all the values in the record just added. If more than one record qualifies, the last record is retrieved, which often is the last record that was added.

In conclusion, here are some external effects of adding new data records.

Note:   Repositioning with a WHERE clause is similar to the SAS base engine processing in which new rows are shown at the end of the SAS data file. On the other hand, repositioning without a WHERE clause reflects the CA-DATACOM/DB processing in which new records are shown in Default Key order. (The record goes in the same place in the table with or without a WHERE clause. This discussion simply explains how it looks to the SAS System.)  [cautionend]


Chapter Contents

Previous

Next

Top of Page

Copyright 1999 by SAS Institute Inc., Cary, NC, USA. All rights reserved.