space
Previous Page | Next Page

Advanced Topics for Users

Inserting Data Records

You can insert data records with SYSTEM 2000 by using the insert or the optimized load mode when updating records with various SAS procedures or when loading a database using the DBLOAD procedure. In PROC DBLOAD, you specify the mode by using the S2KLOAD statement.

When a new observation is inserted, it can cause the insertion of more than one SYSTEM 2000 database record. The number of inserts is based on how many levels are in the database, and on a comparison between the data being inserted and the data in the last observation (if any) that was read. During an insert operation, record levels that have data that is different from the prior observation (if any) result in a SYSTEM 2000 database record being inserted.

You must use insert mode if you are loading new records into existing logical entries. The insert or the optimized load mode can be used in PROC DBLOAD when you are loading new logical entries. The optimized load mode is more efficient than insert mode, but the optimized load mode has the following restrictions:

Note:   During optimized load processing, your output database will be open in exclusive use mode with rollback temporarily disabled.  [cautionend]

Insert mode is suitable for mass insertion of descendant records into existing logical entries when using PROC DBLOAD. Similar to the optimized load mode, the interface view engine determines where to insert the new records, based on the values of fields in the observation. When you insert an observation, the engine compares it to the prior observation. Based on how many fields have changed, one or more records are inserted at the levels that have changed. Also, you can use a BY key to help determine where records are inserted. (BY keys are discussed in the next section.)

space
Previous Page | Next Page | Top of Page