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 Repeating Blocks of Data

Overview

Each record in the file Tempdata contains three blocks of data. Each block contains a date followed by the day's high temperature in a small city located in the southern United States.
Raw Data File Tempdata
Raw Data File Tempdata showing the date and high temperature.
You could write a DATA step that reads each record and creates three different Date and Temp variables.
Three Date and Temp Variables
SAS data set showing three Date and Temp variables.
Alternatively, you could create a separate observation for each block of data in a record. This data set is better structured for analysis and reporting with ...

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