SAS OnlineTutor HomeFAQ PageSuggested Learning PathsContents+Searchback||next

Creating Variables
Specifying Lengths for Variables


Question: What is the length of the variable Sex, as created in the DATA step below?
     data hrd.groups;
        set hrd.fitclass;
        if field1=1 then Sex='male';
        else Sex='female';
        length Sex $ 6;
     run;
   4
   6
   8


  back||next

 

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

Terms of Use & Legal Information | Privacy Statement