backnextLearning Path
   


Introduction

There are times when you want to modify the observations in a SAS data set without replacing the data set. You can do this in a DATA step with the MODIFY statement. Using the MODIFY statement, you can replace, delete, or append observations in an existing data set without creating an additional copy of the data. In this lesson, you learn to modify all the observations in a data set, matching observations using a BY statement, and observations located using an index.

Representation of how a MODIFY statement in a DATA step can affect a SAS data set

When you modify data, it's often essential to safeguard your data and track the changes that are made. In this lesson you learn how to create integrity constraints to protect your data. You will also learn two different methods of tracking changes — audit trails and generation data sets. You use audit trails to track changes that are made to a data set in place, and you use generation data sets to track changes that are made when the data set is rebuilt.



Time to Complete

This lesson contains pages and takes approximately 2 hours to complete.



Objectives

In this lesson, you learn to

  • use the MODIFY statement to update all observations in a SAS data set
  • use a transaction data set to make modifications to a SAS data set
  • use an index to locate observations to modify in a SAS data set
  • place integrity constraints on variables in a SAS data set
  • initiate and manage an audit trail file
  • create and process generation data sets.

Prerequisites

Before taking this lesson, you should complete the following lessons:

  • .

  Copyright © 2003 SAS Institute Inc., Cary, NC, USA. All rights reserved.
Terms of Use & Legal Information | Privacy Statement
backnext