Chapter Contents |
Previous |
Next |
SAS/SHARE User's Guide |
Knowledge of the default data objects and how they are accessed will help you to anticipate the behavior of certain operations when you write your application or issue SAS statements in interactive mode. Default Circumstances for Selected SAS Operations presents the default circumstances for some frequently used SAS operations.
Typical Statements and Commands | How Object Is Locked | What Object Is Locked | |||
---|---|---|---|---|---|
DATA step | |||||
DATA statement with MODIFY statement | update | observation | |||
DATA statement without MODIFY statement | output | member | |||
SET statement without POINT= and KEY= options | input | observation | |||
SET statement with POINT= and KEY= options | input | member | |||
MERGE statement | input | observation | |||
MODIFY statement without POINT= and KEY= options | update | observation | |||
MODIFY statement with POINT= and KEY= options | update | member | |||
UPDATE statement | input | observation | |||
Procedures | |||||
APPEND procedure | |||||
BASE= option | update | observation | |||
DATA= option | input | observation | |||
COPY procedure | |||||
IN= option | input | observation | |||
IN= option with MOVE option | output | observation | |||
OUT= option | output | member | |||
FSBROWSE procedure | |||||
DATA= option | input | observation | |||
FSEDIT procedure | |||||
DATA= option | update | observation | |||
FSVIEW procedure | |||||
DATA= option without EDIT option | input | observation | |||
DATA= option with EDIT option | update | observation | |||
PRINT procedure | |||||
DATA= option | input | observation | |||
UNIFORM= option | input | member | |||
SORT procedure | |||||
DATA= option | input | observation | |||
OUT= option | output | member | |||
SQL procedure | |||||
CREATE TABLE statement | output | member | |||
DELETE statement | update | observation | |||
INSERT statement | update | member | |||
UPDATE statement | update | member |
Changing the Data Set Option Default Object |
For example, for a SET statement that contains the POINT= option, you can change the default from member to observation by specifying the CNTLLEV= data set option:
set datalib.fuel (cntllev=rec) point=obsnum;
Note: If you make this change, the values in a specific
observation may differ each time that you read the observation.
Note: The value, rec (for record), means the same as
observation.
set datalib.fuel (cntllev=mem); by area;
In some cases, you cannot override the default setting because the statement or the command requires it. For example, a DATA statement requires a member setting when the MODIFY statement is omitted from the DATA step. Without the MODIFY statement, the data set that is specified in the DATA statement must be opened for output. Thus, even if you specify CNTLLEV=REC in such a DATA statement, the DATA step tries to set the object as member but will fail if other operations are accessing the data set.
Note: Be careful when using the CNTLLEV= option for
a procedure. Some procedures make multiple passes through an input data set
and require that the data remains the same to guarantee the integrity of the
output. If they have this requirement, such procedures issue a warning but
allow their objects to be re-set with the CNTLLEV= option.
For details about the syntax of the CNTLLEV= option in the SET statement, see The CNTLLEV= Data Set Option.
Chapter Contents |
Previous |
Next |
Top of Page |
Copyright 1999 by SAS Institute Inc., Cary, NC, USA. All rights reserved.