O'Reilly logo

SAS Certification Prep Guide, 4th Edition by SAS Institute

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Creating One Observation per Detail Record

The Basics of Creating One Observation per Detail Record

In order to create one observation per detail record, it is necessary to distinguish between header and detail records. Having a field that identifies the type of the record makes this task easier.
In the partial raw data file Census shown below, H indicates a header record that contains a street address, and P indicates a detail record that contains information about a person who lives at that address.
Partial Raw Data File

Retaining the Values of Variables

While writing the DATA step to read this file, remember that you want to keep the header record as ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required