Introduction

Raw data can be organized in several 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---+----30-- 
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     


By contrast, the following external file contains data that is free-format, meaning data that is not arranged in columns. Notice that the values for a particular field do not begin and end in the same columns.


 
1---+----10---+----20---+----30-- 
ABRAMS L.MARKETING $18,209.03    
BARCLAY M.MARKETING $18,435.71   
COURTNEY W.MARKETING $20,006.16  
FARLEY J.PUBLICATIONS $21,305.89 
HEINS W.PUBLICATIONS $20,539.23  


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



Notice:

Setting Up Filerefs for Practices in This Lesson




1 hour



In this lesson, you learn to use the INPUT statement with list input to read

  • free-format data (data that is not organized in fixed fields)
  • free-format data that is separated by nonblank delimiters, such as commas
  • free-format data that contains missing values
  • character values that exceed eight characters
  • nonstandard free-format data
  • character values that contain embedded blanks.

In addition, you learn how to mix column, formatted, and list input styles in a single INPUT statement.
 


complete the following lessons:

  • .