SAS OnlineTutor HomeFAQ PageSuggested Learning PathsContents+Searchback||next

Creating Variables
Specifying Lengths for Variables


Question: In the DATA step below, the variable City is created and stored in the data set. What is the length of City?
     data census.totals;
        set adjust.rates;
        if adjustedrate=3 then
           City='Minneapolis';
        else if adjrate=5 then
             City='Chicago';
        TotalPopulation+citypopulation;
     run;
  11
  7
  11 or 7, depending on the value of City in the first observation in the data set


  back||next

 

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

Terms of Use & Legal Information | Privacy Statement