SAS OnlineTutor HomeFAQ PageSuggested Learning PathsContents+Searchback||next

Reading Raw Data in Fixed Fields
Using Informats


Reading Character Values

The $w. informat enables you to read character data. The w represents the field width of the data value or the total number of columns that contain the raw data field.

In the example below, the $ indicates that FirstName is a character variable, the 5 indicates a field width of five columns, and a period ends the informat.

     input @9 FirstName $5.

               12345
1---+---V10---+----20---+---
EVANS   DONNY 112 29,996.63 
HELMS   LISA  105 18,567.23 
HIGGINS JOHN  111 25,309.00 
LARSON  AMY   113 32,696.78 
MOORE   MARY  112 28,945.89 
POWELL  JASON 103 35,099.50 
RILEY   JUDY  111 25,309.00 
RYAN    NEAL  112 28,180.00 
WILSON  HENRY 113 31,875.46 
WOODS   CHIP  105 17,098.71 



back||next


Copyright © 2002 SAS Institute Inc., Cary, NC, USA. All rights reserved.

Terms of Use & Legal Information | Privacy Statement