SAS OnlineTutorback||next

Try It! Convert numeric data to character data. Use the SAS data set Act.Talent.

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.njtalent;
       set act.talent;
       NewPhone='(201)'||phone;
    proc print data=act.njtalent;
    run;	    
  2. Submit the program and view the new variable NewPhone.
     
  3. Note the conversion message in the SAS log.
     
  4. Revise the DATA step to explicitly convert Phone to character with a width of 7. 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