SAS OnlineTutor HomeFAQ PageSuggested Learning PathsContents+Searchback||next

Reading Raw Data in Fixed Fields
Record Formats


The PAD Option

You can avoid problems when reading variable-length records that contain fixed-field data by using the PAD option in the INFILE statement.The PAD option pads each record with blanks so that all data lines have the same length.

     infile receipts pad;

1---+----10---+----20--
BED/BATH    1,354.93  
HOUSEWARES  2,464.05  
GARDEN      923.34     
GRILL       598.34     
SHOES       1,345.82  
SPORTS                 
TOYS        6,536.53  


You do not need to use the PAD option for the exercises in this module. However, when you use column or formatted input to read fixed-field data in variable-length records, remember to determine whether or not to use the PAD option.

Note: For more information about the PAD option, see SAS Language Reference: Dictionary.


back||next


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

Terms of Use & Legal Information | Privacy Statement