Example 7.3 Modifying an Indexed Master Data Set in Place


Modify a master data set in place based on information supplied by a transaction data set. Observations can be added to, modified in, or deleted from the master data set. The master data set and transaction data set do not contain any multiple occurrences of the key variables.

Example Features

Featured StepDATA step
Featured Step Options and StatementsMODIFY statement in conjunction with the OUTPUT, REPLACE, and REMOVE statements

KEY= option in the MODIFY statement

_IORC_ automatic variable

Macro function %SYSRC

Input Data Sets

Data set POLICIES contains data for 12 policy holders. Assume it has a simple index on variable ID. The POLICIES data set is also used in Example 4.5.

Get Combining and Modifying SAS® Data Sets: Examples Second Edition now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.