SAS OnlineTutor HomeFAQ PageSuggested Learning PathsContents+Searchback||next

Producing HTML Output
The ODS HTML Statement


Creating HTML Output from Multiple Procedures

You can also use the ODS HTML statement to direct the results from multiple procedures to the same HTML file.

The program below generates HTML output for a PROC PRINT step and a PROC TABULATE step. The results for both procedures are written to the file C:\Records\data.html in the Windows environment. A link for each output object (one for each procedure) appears in the Results window.

      ods html body='c:\records\data.html';
      proc print data=clinic.admit label;
         var id sex age height weight actlevel;
         label actlevel='Activity Level';
      run;
      proc tabulate data=clinic.stress2;
         var resthr maxhr rechr;
         table min mean, resthr maxhr rechr;
      run;
      ods html close;
The following is a representation of the HTML file containing the results from the program above. Notice that the results from each procedure are appended.


The SAS System

Obs ID Sex Age Height Weight Activity
Level
1 2458 M 27 72 168 HIGH
2 2462 F 34 66 152 HIGH
3 2501 F 31 61 123 LOW
4 2523 F 43 63 137 MOD
5 2539 M 51 71 158 LOW
6 2544 M 29 76 193 HIGH
7 2552 F 32 67 151 MOD
8 2555 M 35 70 173 MOD
9 2563 M 34 73 154 LOW
10 2568 F 49 64 172 LOW
11 2571 F 44 66 140 HIGH
12 2572 F 28 62 118 LOW
13 2574 M 30 69 147 MOD
14 2575 F 40 69 163 HIGH
15 2578 M 47 72 173 MOD
16 2579 M 60 71 191 LOW
17 2584 F 43 65 123 MOD
18 2586 M 25 75 188 HIGH
19 2588 F 22 63 139 LOW
20 2589 F 41 67 141 HIGH
21 2595 M 54 71 183 MOD


The SAS System

  RestHR MaxHR RecHR
Min 65.00 152.00 108.00
Mean 72.95 171.10 128.95



back||next


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

Terms of Use & Legal Information | Privacy Statement