SAS OnlineTutor HomeFAQ PageSuggested Learning PathsContents+Searchback||next

Producing HTML Output
Creating a Linked Table of Contents


The CONTENTS= and FRAME= Specifications

So far in this lesson, you've used the BODY= specification to create a body file only. You can also use the CONTENTS= and FRAME= specifications with the ODS HTML statement to create a table of contents that links to your body file.


Frame with TOC and Body File

Example

In the program below,

  • the BODY= specification creates the HTML file data.html, which contains the results

  • the CONTENTS= specification creates a table of contents, toc.html, which contains links to the body file

  • the FRAME= specification creates a frame file, frame.html, which integrates the table of contents and the body file.

      ods listing close;
      ods html body='c:\records\data.html'
               contents='c:\records\toc.html'
               frame='c:\records\frame.html';
      proc print data=clinic.admit label;
         var sex age height weight actlevel;
         label actlevel='Activity Level';
      run;
      proc print data=clinic.stress2;
         var id resthr maxhr rechr;
      run;
      ods html close;
      ods listing;

Viewing Frame Files

The Results window does not display links to frame files, and in the Windows environment only the body file will automatically appear in the internal browser or your preferred Web browser. To view the frame file that integrates the body file and the table of contents, select

File --> Open

from within the internal browser or your preferred Web browser. Then open the frame file that you specified using FRAME=. In the example above, this file is C:\Records\frame.html in the Windows operating environment.

HTML Frame File


back||next


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

Terms of Use & Legal Information | Privacy Statement