SAS OnlineTutorback||next

Try It! Convert character data to numeric data.

Creating HTML output? Read this first.

  1. Copy the program below and paste it into the Program Editor window (or issue the command copy sashelp.oltutor..source).
    data act.talent2;
       set act.talent;
       FtHeight=height/12;
    proc print data=act.talent2;
    run;
    

  2. Submit the program and view the new variable FtHeight.
     
  3. Note the conversion message in the SAS log.
     
  4. Revise the DATA step to explicitly convert Height to numeric with a length of 2. Resubmit the program.

    Return here and select Next.

Solution

back||next


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

Terms of Use & Legal Information | Privacy Statement