Raw data files can be hierarchical in
structure, consisting of a header record and one or more detail records.
Typically, each record contains a field that identifies the record
type.
In the raw data file
above, the P indicates a header record that contains a patient's ID
number. The C indicates a detail record that contains the date of
the patient's appointment and the charges that the patient has incurred.
This book covers two methods of building a SAS data set from a hierarchical
file. You can build a SAS data set from a hierarchical file by creating
one observation per detail record, retaining the patient ID from the
header record. You can also build a SAS data set from a hierarchical
file by creating one observation per header record and combining the
information from detail records into summary variables. These are
powerful features of SAS that enable complex raw data files to be
converted into SAS data sets for statistical analysis.