O'Reilly logo

SAS Certification Prep Guide: Base Programming for SAS 9, Third 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 Header Record

Overview

In the previous example, you learned how to create one observation per detail record. But suppose you only want to know how many people reside at each address. You can create a data set that reads each detail record, counts the number of people, and stores this number in a summary variable.
In the example below, this summary variable, Total, is computed for each address. As you can see, creating one observation per header record condenses a large amount of information into a concise data set.
Raw Data File
As you write the DATA step to read this file, you need to think about performing several tasks. ...

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