SAS OnlineTutorback||next

Try It! Create and sort an output data set using Clinic.Admit.

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).
    proc print data=clinic.admit;
       var age height weight fee;
       where age>30;
       sum fee;
    run;
    

  2. Insert 3 lines before the PROC PRINT step. Write a PROC SORT step to read the data set Clinic.Admit and create an output data set, Work.Report, that is sorted by values of Age. Change the PROC PRINT step to print Work.Report.

  3. Submit the program and view the output, which should display 15 observations and 4 variables. Check the log to make sure that Work.Report was created correctly with 21 observations and 9 variables.

    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