Reading a Single SAS Data Set to Create Another
Example: Reading a SAS Data Set
The
data set Cert.Admit contains health information about patients in
a clinic, their activity level, height, and weight. Suppose you want
to create a subset of the data. Specifically, you want to create a
small data set containing data about all the men in the group who
are older than 50.
To create the data set, you must first reference the
library in which Cert.Admit is stored. Then you must specify the name
of the library in which you want to store the Males data set. Finally,
you add statements to the DATA step to read your data and create a
new data set.
The DATA step below reads all observations and variables from the existing data set Cert.Admit into ...
Get SAS Certified Specialist Prep Guide 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.