Modifying Observations Located by an Index

Overview

You have learned that you can use a BY statement to access values that you want to update in a master data set by matching. When you have an indexed master data set, you can use the index to directly access the observations that you want to update. To do this, you use the following statements:
  • a MODIFY statement with the KEY= option to name an index to locate the observations for updating
  • a SET statement or INPUT statement to read a transaction data set with a like-named variable or variables whose values are supplied to the index
General form, MODIFY statement with the KEY= option:
MODIFY SAS-data-set KEY=index-name;
Here is an explanation of the syntax:
SAS-data-set ...

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.