SAS author's tip: TAGSETS.RTF and table of contents

4

I bet that many of you reading our blog are familiar with accomplished SAS users and authors Lauren Haworth, Cynthia Zender, and Michele Burlew. Together, they form a powerful triumvirate of SAS experience. If you get a chance to pick up their book Output Delivery System: The Basics and Beyond or read about some of the cool features on their book's Web catalog page, I think you’ll understand why this 600-page-plus guide flies off the shelves.

The following excerpt is from SAS Press authors Lauren Haworth’s, Cynthia Zender’s, and Michele Burlew’s book Output Delivery System: The Basics and Beyond © 2009, SAS Institute Inc., Cary, North Carolina, USA. ALL RIGHTS RESERVED. (please note that results may vary depending on your version of SAS software)

Output Delivery System book

Generating a Table of Contents with TAGSETS.RTF 

We have already seen the use of the CONTENTS= option with ODS RTF. To generate a table of contents with TAGSETS.RTF, the method is very similar. Consider the following code:

 ODS TAGSETS.RTF FILE='TOC_SUBOPTIONS.rtf'

OPTIONS(CONTENTS='yes' TOC_DATA='yes');

title 'Human Resources Reports';

 
proc means data=hr nonobs maxdec=0 mean sum;

class Department;

var AnnualSalary;

run;

 
proc print data=hr(obs=25);

run;

ODS _ALL_ CLOSE;

Although you might need to right-click farther down on the page than with traditional ODS RTF TOC
generation, after you right-click and select Update Field, you will see a table of contents generated.

You can get a lot more information about this book including a free chapter and read SAS users’ reviews here!

Share

About Author

Shelly Goodin

Social Media Specialist, SAS Publications

Shelly Goodin is SAS Publications' social media marketer and the editor of "SAS Publishing News". She’s worked in the publishing industry for over thirteen years, including seven years at SAS, and enjoys creating opportunities for fans of SAS and JMP software to get to know SAS Publications' many offerings and authors.

Related Posts

4 Comments

  1. tagsets.rtf has adventages on tablerows and uniform etc, but one problem with me, the bottom line for last page can not be on the bottom (bottomheader not work for me), it on the middle of page since only a few lines for last page. It was fine with my rtf template. do you have any idea? thanks Lili

  2. Pingback: SAS author’s tip: Sending ODS output to your printer - The SAS Bookshelf

  3. Pingback: SAS author’s tip: selecting variables to include in output - The SAS Bookshelf

Back to Top