Controlling the Update Process

Overview

When the DATA step contains a MODIFY statement, SAS writes the current observation to its original place in the SAS data set. This action occurs by default through an implied REPLACE statement at the bottom of the DATA step.
However, you can override this default behavior by explicitly adding the OUTPUT, REPLACE, or REMOVE statement.
General form for OUTPUT, REPLACE, and REMOVE statements:
OUTPUT;
REPLACE;
REMOVE;
Here is an explanation of the syntax:
OUTPUT
adds the current observation to the end of the data set.
REPLACE
writes the current observation to the same location in the data set.
REMOVE
removes the current observation from the data set.
Using OUTPUT, REPLACE, or REMOVE ...

Get SAS Certification Prep Guide, 4th Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.