<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: SAS HTML TOC Nodes in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/SAS-HTML-TOC-Nodes/m-p/919574#M362197</link>
    <description>&lt;P&gt;I would suggest ODS and PROC DOCUMENT to get the Table of Contents you described. Here's sample code, a screen shot of my contents= file, and a link to a paper on the subject in case it's helpful:&lt;/P&gt;
&lt;P&gt;&lt;BR /&gt;ods html file="before.html" contents="beforec.html" path="c:\temp";&lt;/P&gt;
&lt;P&gt;ods document name=TOCtest(write);&lt;BR /&gt;proc sgplot data=sashelp.class;&lt;BR /&gt;vbar age / response=height;&lt;BR /&gt;run;&lt;BR /&gt;quit;&lt;/P&gt;
&lt;P&gt;proc sgpanel data=sashelp.class;&lt;BR /&gt;panelby age / novarname columns=1;&lt;BR /&gt;where age=15;&lt;BR /&gt;hbar height;&lt;BR /&gt;run;&lt;/P&gt;
&lt;P&gt;ods html close;&lt;BR /&gt;ods document close;&lt;/P&gt;
&lt;P&gt;/* adjust the default style to enhance the table of contents */&lt;BR /&gt;/* here we remove the roman numeral in front of the first node */&lt;BR /&gt;ods path (prepend) work.template(update);&lt;BR /&gt;proc template;&lt;BR /&gt;define style styles.test;&lt;BR /&gt;parent=styles.htmlblue;&lt;BR /&gt;style contentProcname from Indexprocname /&lt;BR /&gt;bullet=none;&lt;BR /&gt;end;&lt;BR /&gt;run;&lt;/P&gt;
&lt;P&gt;ods listing;&lt;BR /&gt;proc document name=TOCtest;&lt;BR /&gt;list / levels=all;&lt;BR /&gt;run;&lt;BR /&gt;make \test;&lt;BR /&gt;dir \test#1;&lt;BR /&gt;setlabel \test#1 "First Node";&lt;BR /&gt;setlabel \SGPlot#1\SGPlot#1 "First Output";&lt;BR /&gt;setlabel \SGPanel#1\SGPanel#1 "Second Output";&lt;BR /&gt;copy \SGPlot#1\SGPlot#1 to ^;&lt;BR /&gt;copy \SGPanel#1\SGPanel#1 to ^;&lt;BR /&gt;ods listing close;&lt;/P&gt;
&lt;P&gt;ods html file="after.html" contents="afterc.html" path="c:\temp" style=styles.test;&lt;BR /&gt;replay \test#1;&lt;BR /&gt;run;&lt;BR /&gt;ods html close;&lt;BR /&gt;quit;&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Bari_sas_0-1709931534959.png" style="width: 400px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/94519i8AD442605083E374/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Bari_sas_0-1709931534959.png" alt="Bari_sas_0-1709931534959.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&lt;BR /&gt;&lt;A href="https://support.sas.com/resources/papers/proceedings11/252-2011.pdf" target="_blank"&gt;https://support.sas.com/resources/papers/proceedings11/252-2011.pdf&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;</description>
    <pubDate>Fri, 08 Mar 2024 20:59:31 GMT</pubDate>
    <dc:creator>Bari_sas</dc:creator>
    <dc:date>2024-03-08T20:59:31Z</dc:date>
    <item>
      <title>SAS HTML TOC Nodes</title>
      <link>https://communities.sas.com/t5/SAS-Programming/SAS-HTML-TOC-Nodes/m-p/918138#M361672</link>
      <description>&lt;P&gt;Hi Everyone, the code below works but produces the following table of contents:&lt;/P&gt;&lt;P&gt;Data Sample&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;Testing Var&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;Data Sample&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;Testing Var2&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;I would like to produce the following table of contents:&lt;/P&gt;&lt;P&gt;Data Sample&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;Testing Var&lt;/LI&gt;&lt;LI&gt;Testing Var2&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;Let me know how to change the TOC. Thanks.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;%macro graph1(inds=, var=, vard=,);&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;ods graphics on;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;ods tagsets.sasreport13 (ID=EGSR) gtitle;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;title "Data Sample Graph";&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;ods proc label "Data Sample";&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;proc sgplot data=&amp;amp;inds description="&amp;amp;vard";&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;yaxis type=Time interval=month;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;yaxis label='Complete' ;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;series x=period_dt y=complete_pct / lineattrs=(color=red) legendlabel='Count';&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;run;&amp;nbsp;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;ods graphics off;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;%mend;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;ods html path=&amp;amp;folder&amp;nbsp;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;body='body1.html'&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;contents='contents1.html'&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;frame='main1.html';&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;%graph1(inds=workdata, var=var1, vard=Testing Var);&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;ods html close;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;%graph1(inds=workdata, var=var2, vard=Testing Var2);&lt;/STRONG&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 27 Feb 2024 23:27:41 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/SAS-HTML-TOC-Nodes/m-p/918138#M361672</guid>
      <dc:creator>atnk</dc:creator>
      <dc:date>2024-02-27T23:27:41Z</dc:date>
    </item>
    <item>
      <title>Re: SAS HTML TOC Nodes</title>
      <link>https://communities.sas.com/t5/SAS-Programming/SAS-HTML-TOC-Nodes/m-p/919574#M362197</link>
      <description>&lt;P&gt;I would suggest ODS and PROC DOCUMENT to get the Table of Contents you described. Here's sample code, a screen shot of my contents= file, and a link to a paper on the subject in case it's helpful:&lt;/P&gt;
&lt;P&gt;&lt;BR /&gt;ods html file="before.html" contents="beforec.html" path="c:\temp";&lt;/P&gt;
&lt;P&gt;ods document name=TOCtest(write);&lt;BR /&gt;proc sgplot data=sashelp.class;&lt;BR /&gt;vbar age / response=height;&lt;BR /&gt;run;&lt;BR /&gt;quit;&lt;/P&gt;
&lt;P&gt;proc sgpanel data=sashelp.class;&lt;BR /&gt;panelby age / novarname columns=1;&lt;BR /&gt;where age=15;&lt;BR /&gt;hbar height;&lt;BR /&gt;run;&lt;/P&gt;
&lt;P&gt;ods html close;&lt;BR /&gt;ods document close;&lt;/P&gt;
&lt;P&gt;/* adjust the default style to enhance the table of contents */&lt;BR /&gt;/* here we remove the roman numeral in front of the first node */&lt;BR /&gt;ods path (prepend) work.template(update);&lt;BR /&gt;proc template;&lt;BR /&gt;define style styles.test;&lt;BR /&gt;parent=styles.htmlblue;&lt;BR /&gt;style contentProcname from Indexprocname /&lt;BR /&gt;bullet=none;&lt;BR /&gt;end;&lt;BR /&gt;run;&lt;/P&gt;
&lt;P&gt;ods listing;&lt;BR /&gt;proc document name=TOCtest;&lt;BR /&gt;list / levels=all;&lt;BR /&gt;run;&lt;BR /&gt;make \test;&lt;BR /&gt;dir \test#1;&lt;BR /&gt;setlabel \test#1 "First Node";&lt;BR /&gt;setlabel \SGPlot#1\SGPlot#1 "First Output";&lt;BR /&gt;setlabel \SGPanel#1\SGPanel#1 "Second Output";&lt;BR /&gt;copy \SGPlot#1\SGPlot#1 to ^;&lt;BR /&gt;copy \SGPanel#1\SGPanel#1 to ^;&lt;BR /&gt;ods listing close;&lt;/P&gt;
&lt;P&gt;ods html file="after.html" contents="afterc.html" path="c:\temp" style=styles.test;&lt;BR /&gt;replay \test#1;&lt;BR /&gt;run;&lt;BR /&gt;ods html close;&lt;BR /&gt;quit;&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Bari_sas_0-1709931534959.png" style="width: 400px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/94519i8AD442605083E374/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Bari_sas_0-1709931534959.png" alt="Bari_sas_0-1709931534959.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&lt;BR /&gt;&lt;A href="https://support.sas.com/resources/papers/proceedings11/252-2011.pdf" target="_blank"&gt;https://support.sas.com/resources/papers/proceedings11/252-2011.pdf&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 08 Mar 2024 20:59:31 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/SAS-HTML-TOC-Nodes/m-p/919574#M362197</guid>
      <dc:creator>Bari_sas</dc:creator>
      <dc:date>2024-03-08T20:59:31Z</dc:date>
    </item>
  </channel>
</rss>

