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

Reading the Same Number of Repeating Fields

The Basics of Reading the Same Number of Repeating Fields

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.
Figure 21.17 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 DATA step once for each record, repetitively reading and writing values in one iteration.
This means that a DATA step must do 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