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

Reading the Same Number of Repeating Fields

Overview

So far, you have created multiple observations from a single record by executing the DATA step once for each block of data in a record.
Now, look at another file that is organized differently.
Each record in the file Data97 contains a sales representative's ID number, followed by four repeating fields that represent his or her quarterly sales totals for 1997.
You want to pair each employee ID number with one quarterly sales total to produce a single observation. Four observations are generated from each record.
Multiple Fields for the Same ID
Raw data file and output file showing ID number and four repeating fields.
To accomplish this, you must execute the ...

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