Chapter Contents

Previous

Next
SAS/ACCESS Interface to SYSTEM 2000 Data Management Software: Reference

Incremental Load Example

This section illustrates how to load more logical entries into an existing SYSTEM 2000 database. You invoke the DBLOAD procedure and specify the input data file and the appropriate view descriptor. The view descriptor contains the database name, the component names, levels, and so on. It also contains the password for the database and the access mode (single user or Multi-User). You can use a SAS WHERE clause to limit the input. (If the view descriptor includes a SYSTEM 2000 where-clause, it does not affect an incremental load.)

To perform the incremental load with the DBLOAD procedure, use the following options and statements. In this example, the data file is TRANS.INCLOAD.

JCL statements;

proc dbload dbms=s2k data=trans.incload;
  viewdesc=vlib.myview;
load;
run;
proc dbload dbms=s2k data=trans.incload;
invokes the DBLOAD procedure. The DBMS= option specifies the DBMS into which you want to load data. The DATA= option specifies the SAS data file where the data reside.

viewdesc=vlib.myview;
specifies the appropriate view descriptor with the VIEWDESC= statement.

load; run;
executes the DBLOAD procedure and loads the database.


Adding New Logical Entries Versus Updating Existing Logical Entries

Incremental loads can add either new logical entries or new records to existing records. Both types of incremental loading are performed the same way, as shown in the above example. How then does the SYSTEM 2000 engine know whether to insert new logical entries or append records to existing logical entries?

One simple way for the engine to tell the difference is whether you have issued the S2KLOAD statement. If so, the input observations are treated as new logical entries. Several observations may be collected to form each logical entry, but they are all new. Your observations must be sorted in order to achieve the correct result.

If you did not issue the S2KLOAD statement, your results depend on the order of your observations and whether your view descriptor contains a BY key. A BY key identifies the placement of inserted data records in an incremental load. See Using a BY Key to Resolve Ambiguous Inserts. When using a BY key, it is best (less ambiguous) if your view descriptor and the BY key begin at level 0, even if you are loading records only at some lower level.


Chapter Contents

Previous

Next

Top of Page

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