O'Reilly logo

SAS Certification Prep Guide, 4th Edition by SAS Institute

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

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 ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required