Producing HTML Output |
The ODS HTML Statement |
Results: The Body File
When you specify only BODY= in the ODS HTML statement, you create only a body file that contains procedure results. The file contains the results of all PROC steps between the ODS HTML statement and ODS HTML CLOSE. |
ods html body='f:\admit.html'; proc print data=clinic.admit label; var sex age height weight actlevel; label actlevel='Activity Level'; run; ods html close; |
The program above writes this output to the file
|
Obs | Sex | Age | Height | Weight | Activity Level |
1 | M | 27 | 72 | 168 | HIGH |
2 | F | 34 | 66 | 152 | HIGH |
3 | F | 31 | 61 | 123 | LOW |
4 | F | 43 | 63 | 137 | MOD |
5 | M | 51 | 71 | 158 | LOW |
6 | M | 29 | 76 | 193 | HIGH |
7 | F | 32 | 67 | 151 | MOD |
8 | M | 35 | 70 | 173 | MOD |
9 | M | 34 | 73 | 154 | LOW |
10 | F | 49 | 64 | 172 | LOW |
11 | F | 44 | 66 | 140 | HIGH |
12 | F | 28 | 62 | 118 | LOW |
13 | M | 30 | 69 | 147 | MOD |
14 | F | 40 | 69 | 163 | HIGH |
15 | M | 47 | 72 | 173 | MOD |
16 | M | 60 | 71 | 191 | LOW |
17 | F | 43 | 65 | 123 | MOD |
18 | M | 25 | 75 | 188 | HIGH |
19 | F | 22 | 63 | 139 | LOW |
20 | F | 41 | 67 | 141 | HIGH |
21 | M | 54 | 71 | 183 | MOD |
Viewing Your HTML Output
If you're working in the Windows environment, when you submit the program, the body file will automatically appear in the SAS internal browser or your preferred Web browser, as specified in the Results tab of the Preferences window. In other operating environments, you can double-click the corresponding link in the Results window to view the HTML output in your Web browser. If you don't have a Web browser in your operating environment, you can transfer the HTML files to an operating environment where you can view them. |
Copyright © 2002 SAS Institute Inc.,
Cary, NC, USA. All rights reserved.