Modifying Observations Located by an Index


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 O’Reilly online learning.

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