Adding Information to a SAS Data Set
Understanding the Assignment Statement
One of the most common reasons
for using program statements in the DATA step is to produce new information
from the original information or to change the information read by
the INPUT or SET/MERGE/MODIFY/UPDATE statement. How do you add information
to observations with a DATA step?
The basic method of
adding information to a SAS data set is to create a new variable in
a DATA step with an assignment statement. An assignment statement
has the form:
variable=expression;
The variable receives the new information; the expression creates the new information. You specify the calculation necessary to produce the information and write the calculation as the expression. When ...
Get Step-by-Step Programming with Base SAS 9.4 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.