SAS OnlineTutor HomeFAQ PageSuggested Learning PathsContents+Search||next

Reading Raw Data in Fixed Fields
Lesson Overview


Introduction

Raw data can be organized in several different ways.

This external file contains data that is arranged in columns or fixed fields. You can specify a beginning and ending column for each field.
1---+----10---+----20---+--
BIRD FEEDER   LG088  3 20
GLASS MUGS    SB082  6 12
GLASS TRAY    BQ049 12  6
PADDED HANGRS MN256 15 20
JEWELRY BOX   AJ498 23  0
RED APRON     AQ072  9 12
CRYSTAL VASE  AQ672 27  0
PICNIC BASKET LS930 21  0

However, this external file contains data that is free-format, meaning data that are not arranged in columns. Notice that the values for a particular field do not begin and end in the same columns
1---+----10---+----20---+--
BARNES NORTHWEST 36098.45
FARLSON SOUTHWEST 24394.09
LAWRENCE NORTHEAST 19504.26
NELSON SOUTHEAST 16930.84
STEWART MIDWEST 23845.13
TAYLOR MIDWEST 12354.42
TREADWAY SOUTHWEST 41092.84
WALSTON SOUTHEAST 28938.71


How your data is organized determines which input style you should use to read the data. SAS software provides three primary input styles: column, formatted, and list input. This lesson teaches you how to use column or formatted input to read data that is arranged in fixed fields.

This lesson contains 33 pages and takes approximately 45-60 minutes to complete.


Objectives

In this lesson you learn to

  • distinguish between standard and nonstandard numeric data
  • read standard fixed-field data
  • read nonstandard fixed-field data.


Prerequisites

Before taking this lesson, you should have completed the following lessons

Introduction to SAS Programming
Creating SAS Data Sets
Reading Various Types of Raw Data


||next


Copyright © 2002 SAS Institute Inc., Cary, NC, USA. All rights reserved.
Terms of Use & Legal Information | Privacy Statement