SAS OnlineTutorback||next

Try It! Using the Aug99dat raw data file, format a variable by using a user-defined format.

Note: Note: If you did not complete the previous guided practice, return there and complete it before continuing this practice.

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). A LIBNAME statement and a FILENAME statement have already been submitted for you.
    data perm.orders;
       infile aug99dat;
       input ID 3. @5 Date date7.
             Item $13 Quantity 15-17
             Price 19-24 TotalCost 26-32;
    run;
    proc print data=perm.orders;
    run;
  2. Add a FORMAT statement to the DATA step that associates Item with the $ItemFmt format. Note: The libref Library has already been assigned for you.

  3. The FORMAT statement should also include the following:
         Date         DATE9.
         TotalCost    DOLLAR9.2
  4. Submit the program and view the output.

    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