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 a Varying Number of Repeating Fields

Overview

So far, each record in the file Data97 has contained the same number of repeating fields.
Raw Data File Data97
Raw Data File Data97.
But suppose that some of the employees quit at various times. Their records might not contain sales totals for the second, third, or fourth quarter. These records contain a variable number of repeating fields.
Raw Data File Data97 Showing Empty Records
Raw Data File Data97 Showing Empty Records.
The DATA step that you just wrote won't work with a variable number of repeating fields because now the value of Quarter is ...

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