Previous Page | Next Page

Modifying SAS Data Sets

Review of SAS Tools


Statements

BY by-variable;

specifies one or more variables to use with the BY statement. You use the BY variable to identify corresponding observations in a master data set and a transaction data set.

MODIFY master-SAS-data-set transaction-SAS-data-set
<UPDATEMODE=MISSINGCHECK|NOMISSINGCHECK>;

replaces the values of variables in one SAS data set with values from another SAS data set. The master-SAS-data-set contains data that you want to update. The transaction-SAS-data-set contains observations with which to update the master data set.

The UPDATEMODE argument determines whether missing values in the transaction data set overwrite values in the master data set. The MISSINGCHECK option prevents missing values in a transaction data set from replacing values in a master data set. This is the default. The NOMISSINGCHECK option enables missing values in a transaction data set to replace values in a master data set by preventing the check for missing data from being performed.

MODIFY SAS-data-set;

replaces the values of variables in a data set with values that you specify in your program.

OUTPUT;

if a MODIFY statement is present, writes the current observation to the end of the master data set.

REPLACE;

if a MODIFY statement is present, writes the current observation to the same physical location from which it was read in a data set that is named in the DATA statement.

Previous Page | Next Page | Top of Page