SAS OnlineTutor HomeFAQ PageSuggested Learning PathsContents+Searchback||next

Reading Hierarchical Files
Creating One Observation per Detail Record


Question: Write an IF-THEN statement to define a condition so that, when the value of type is H, an INPUT statement reads the values for Address. The longest value for Address contains 15 characters.

1---+----10---+----
H 321 S. MAIN ST 
P MARY E    21 F
P WILLIAM M 23 M 
P SUSAN K    3 F
          data perm.people;
             infile census;
             retain Address;
             input type $1. @;
             

           

  back||next

 

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

Terms of Use & Legal Information | Privacy Statement