<?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: Inserting new IDX anchor in ODS and Base Reporting</title>
    <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/Inserting-new-IDX-anchor/m-p/73005#M8312</link>
    <description>Indeed you are right, Cynthia.&lt;BR /&gt;
&lt;BR /&gt;
Your "ods text" ("ods html text" for me in 9.1) line inserts the HTML line you describe. Sorry about my confused reply. &lt;BR /&gt;
&lt;BR /&gt;
The "ods text" line does not however stealthily (as in: nothing is visible on the HTML page) increment the sas counter for IDX anchor tags. &lt;BR /&gt;
&lt;BR /&gt;
My code does that (there might be a simpler way to do it), but I don't understand how it works.</description>
    <pubDate>Mon, 20 Sep 2010 03:52:11 GMT</pubDate>
    <dc:creator>ChrisNZ</dc:creator>
    <dc:date>2010-09-20T03:52:11Z</dc:date>
    <item>
      <title>Inserting new IDX anchor</title>
      <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/Inserting-new-IDX-anchor/m-p/73001#M8308</link>
      <description>After fluffing around,I managed to get this code working (in 9.1.3) to add dummy anchors to html pages.&lt;BR /&gt;
&lt;BR /&gt;
%macro IncrementIDX;&lt;BR /&gt;
proc template;&lt;BR /&gt;
  define table IncrementIDX;&lt;BR /&gt;
    column a;&lt;BR /&gt;
    define a;&lt;BR /&gt;
      generic=on;&lt;BR /&gt;
    end;&lt;BR /&gt;
  end;&lt;BR /&gt;
run;&lt;BR /&gt;
title; footnote;&lt;BR /&gt;
data _null_;&lt;BR /&gt;
  a=1;&lt;BR /&gt;
  file print ods=(template='IncrementIDX');&lt;BR /&gt;
  put _ods_;&lt;BR /&gt;
run; &lt;BR /&gt;
%mend;&lt;BR /&gt;
&lt;BR /&gt;
I am unsure why it works though. generic=on seems to be the key. Can someone explain?</description>
      <pubDate>Fri, 17 Sep 2010 00:04:33 GMT</pubDate>
      <guid>https://communities.sas.com/t5/ODS-and-Base-Reporting/Inserting-new-IDX-anchor/m-p/73001#M8308</guid>
      <dc:creator>ChrisNZ</dc:creator>
      <dc:date>2010-09-17T00:04:33Z</dc:date>
    </item>
    <item>
      <title>Re: Inserting new IDX anchor</title>
      <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/Inserting-new-IDX-anchor/m-p/73002#M8309</link>
      <description>Hi:&lt;BR /&gt;
  I'm not sure what you mean by adding "dummy anchors" to ODS HTML output. For example, I do NOT need GENERIC=ON to get an IDX tag built for this TABLE template and DATA step:&lt;BR /&gt;
[pre]&lt;BR /&gt;
ods path work.temp(update) sasuser.templat(update) sashelp.tmplmst(read);&lt;BR /&gt;
proc template;&lt;BR /&gt;
  define table IncrementIDX;&lt;BR /&gt;
  column a;&lt;BR /&gt;
  define a;&lt;BR /&gt;
    header='Without Generic for A';&lt;BR /&gt;
  end;&lt;BR /&gt;
end;&lt;BR /&gt;
run;&lt;BR /&gt;
                &lt;BR /&gt;
title; footnote;&lt;BR /&gt;
ods listing close;&lt;BR /&gt;
ods html file='c:\temp\testIDX.html' style=sasweb;&lt;BR /&gt;
data _null_;&lt;BR /&gt;
  a=1;&lt;BR /&gt;
  file print ods=(template='IncrementIDX');&lt;BR /&gt;
  put _ods_;&lt;BR /&gt;
run; &lt;BR /&gt;
ods html close;&lt;BR /&gt;
[/pre]&lt;BR /&gt;
  &lt;BR /&gt;
The generated HTML is:&lt;BR /&gt;
[pre]&lt;BR /&gt;
&amp;lt;div class="branch"&amp;gt;&lt;BR /&gt;
&amp;lt;a name="IDX"&amp;gt;&amp;lt;/a&amp;gt;&lt;BR /&gt;
&amp;lt;div&amp;gt;&lt;BR /&gt;
&amp;lt;div align="center"&amp;gt;&lt;BR /&gt;
&amp;lt;table class="Table" cellspacing="1" cellpadding="7" rules="none" frame="box" summary="Procedure Datastep: FilePrint1"&amp;gt;&lt;BR /&gt;
&amp;lt;colgroup&amp;gt;&lt;BR /&gt;
&amp;lt;col&amp;gt;&lt;BR /&gt;
&amp;lt;/colgroup&amp;gt;&lt;BR /&gt;
&amp;lt;thead&amp;gt;&lt;BR /&gt;
&amp;lt;tr&amp;gt;&lt;BR /&gt;
&amp;lt;th class="r b Header" scope="col"&amp;gt;Without Generic for A&amp;lt;/th&amp;gt;&lt;BR /&gt;
&amp;lt;/tr&amp;gt;&lt;BR /&gt;
&amp;lt;/thead&amp;gt;&lt;BR /&gt;
&amp;lt;tbody&amp;gt;&lt;BR /&gt;
&amp;lt;tr&amp;gt;&lt;BR /&gt;
&amp;lt;td class="r Data"&amp;gt;1&amp;lt;/td&amp;gt;&lt;BR /&gt;
&amp;lt;/tr&amp;gt;&lt;BR /&gt;
&amp;lt;/tbody&amp;gt;&lt;BR /&gt;
&amp;lt;/table&amp;gt;&lt;BR /&gt;
&amp;lt;/div&amp;gt;&lt;BR /&gt;
&amp;lt;/div&amp;gt;&lt;BR /&gt;
&amp;lt;br&amp;gt;&lt;BR /&gt;
&amp;lt;/div&amp;gt;&lt;BR /&gt;
&amp;lt;/body&amp;gt;&lt;BR /&gt;
&amp;lt;/html&amp;gt;&lt;BR /&gt;
[/pre]&lt;BR /&gt;
                      &lt;BR /&gt;
Depending on where/how/why you want to insert an "extra" named section, you might be able to insert your extra named anchors by just using ODS TEXT= (if you were in SAS 9.1.3, you'd need to use ODS HTML TEXT=). There's an example below. The titles and footnotes contain links to the named anchors that were inserted in the ODS TEXT= statements.&lt;BR /&gt;
 &lt;BR /&gt;
cynthia&lt;BR /&gt;
[pre]&lt;BR /&gt;
title; footnote;&lt;BR /&gt;
ods html file='c:\temp\insertIDX.html' style=sasweb;&lt;BR /&gt;
                                            &lt;BR /&gt;
ods text='&amp;lt;div class="branch"&amp;gt;&amp;lt;a name="MYIDX"&amp;gt;&amp;amp;nbsp;&amp;lt;/a&amp;gt;&amp;lt;/div&amp;gt;';&lt;BR /&gt;
                                &lt;BR /&gt;
proc print data=sashelp.class(obs=2);&lt;BR /&gt;
title link='#MYIDX1' 'Go to Shoes';&lt;BR /&gt;
title2 link='#MYIDX2' 'Go to Furniture';&lt;BR /&gt;
run;&lt;BR /&gt;
                                   &lt;BR /&gt;
ods text='&amp;lt;div class="branch"&amp;gt;&amp;lt;a name="MYIDX1"&amp;gt;&amp;amp;nbsp;&amp;lt;/a&amp;gt;&amp;lt;/div&amp;gt;';&lt;BR /&gt;
                                  &lt;BR /&gt;
proc print data=sashelp.shoes(obs=20);&lt;BR /&gt;
title 'Shoe Report';&lt;BR /&gt;
title2 link='#MYIDX' 'Go Back to Top';&lt;BR /&gt;
title3 link='#MYIDX2' 'Go to Furniture';&lt;BR /&gt;
run;&lt;BR /&gt;
                    &lt;BR /&gt;
ods text='&amp;lt;div class="branch"&amp;gt;&amp;lt;a name="MYIDX2"&amp;gt;&amp;amp;nbsp;&amp;lt;/a&amp;gt;&amp;lt;/div&amp;gt;';&lt;BR /&gt;
                          &lt;BR /&gt;
proc print data=sashelp.prdsale(obs=20);&lt;BR /&gt;
title 'Furniture Report';&lt;BR /&gt;
footnote link='#MYIDX' 'Go Back To Top';&lt;BR /&gt;
footnote2 link='#MYIDX1' 'Go to Shoes';&lt;BR /&gt;
footnote3 link='#MYIDX2' 'Go to Furniture';&lt;BR /&gt;
run;&lt;BR /&gt;
ods html close;&lt;BR /&gt;
title; footnote;&lt;BR /&gt;
[/pre]</description>
      <pubDate>Fri, 17 Sep 2010 19:01:41 GMT</pubDate>
      <guid>https://communities.sas.com/t5/ODS-and-Base-Reporting/Inserting-new-IDX-anchor/m-p/73002#M8309</guid>
      <dc:creator>Cynthia_sas</dc:creator>
      <dc:date>2010-09-17T19:01:41Z</dc:date>
    </item>
    <item>
      <title>Re: Inserting new IDX anchor</title>
      <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/Inserting-new-IDX-anchor/m-p/73003#M8310</link>
      <description>Hi Cynthia,&lt;BR /&gt;
&lt;BR /&gt;&lt;BR /&gt;
My code just inserts&lt;BR /&gt;
[pre]&lt;BR /&gt;
&amp;lt;div class="branch"&amp;gt;&lt;BR /&gt;
&amp;lt;a name="IDX10"&amp;gt;&lt;BR /&gt;
&amp;lt;div&amp;gt;&lt;BR /&gt;
&amp;lt;/div&amp;gt;&lt;BR /&gt;
&amp;lt;br&amp;gt;&lt;BR /&gt;
&amp;lt;/div&amp;gt;&lt;BR /&gt;
[/pre]&lt;BR /&gt;
in the html page. Your code adds a table.&lt;BR /&gt;
&lt;BR /&gt;I need this dummy anchor because when I generate outputs, there is no suitable data at times for a group, but the menu pointing to the groups must be kept in sync. &lt;BR /&gt;So I write out a message that uses one IDX anchor, and add "dummy" anchors to pad to the next group.</description>
      <pubDate>Sun, 19 Sep 2010 23:03:43 GMT</pubDate>
      <guid>https://communities.sas.com/t5/ODS-and-Base-Reporting/Inserting-new-IDX-anchor/m-p/73003#M8310</guid>
      <dc:creator>ChrisNZ</dc:creator>
      <dc:date>2010-09-19T23:03:43Z</dc:date>
    </item>
    <item>
      <title>Re: Inserting new IDX anchor</title>
      <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/Inserting-new-IDX-anchor/m-p/73004#M8311</link>
      <description>Hi:&lt;BR /&gt;
  I'm confused...my PROC PRINTS are each generating the "original" IDX anchors, but my ODS TEXT is ONLY generating this:&lt;BR /&gt;
[pre]&lt;BR /&gt;
ods text='&amp;lt;div class="branch"&amp;gt;&amp;lt;a name="MYIDX1"&amp;gt;&amp;amp;nbsp;&amp;lt;/a&amp;gt;&amp;lt;/div&amp;gt;';&lt;BR /&gt;
[/pre]&lt;BR /&gt;
                    &lt;BR /&gt;
There is only an &amp;amp;nbsp; inside the &amp;lt;A&amp;gt; tag...no &amp;lt;TABLE&amp;gt; tag. If you took out the PROC PRINTs, you would see only the results of my ODS TEXT= statements.&lt;BR /&gt;
 &lt;BR /&gt;
cynthia</description>
      <pubDate>Mon, 20 Sep 2010 00:28:30 GMT</pubDate>
      <guid>https://communities.sas.com/t5/ODS-and-Base-Reporting/Inserting-new-IDX-anchor/m-p/73004#M8311</guid>
      <dc:creator>Cynthia_sas</dc:creator>
      <dc:date>2010-09-20T00:28:30Z</dc:date>
    </item>
    <item>
      <title>Re: Inserting new IDX anchor</title>
      <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/Inserting-new-IDX-anchor/m-p/73005#M8312</link>
      <description>Indeed you are right, Cynthia.&lt;BR /&gt;
&lt;BR /&gt;
Your "ods text" ("ods html text" for me in 9.1) line inserts the HTML line you describe. Sorry about my confused reply. &lt;BR /&gt;
&lt;BR /&gt;
The "ods text" line does not however stealthily (as in: nothing is visible on the HTML page) increment the sas counter for IDX anchor tags. &lt;BR /&gt;
&lt;BR /&gt;
My code does that (there might be a simpler way to do it), but I don't understand how it works.</description>
      <pubDate>Mon, 20 Sep 2010 03:52:11 GMT</pubDate>
      <guid>https://communities.sas.com/t5/ODS-and-Base-Reporting/Inserting-new-IDX-anchor/m-p/73005#M8312</guid>
      <dc:creator>ChrisNZ</dc:creator>
      <dc:date>2010-09-20T03:52:11Z</dc:date>
    </item>
    <item>
      <title>Re: Inserting new IDX anchor</title>
      <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/Inserting-new-IDX-anchor/m-p/73006#M8313</link>
      <description>Hi:&lt;BR /&gt;
  Think of the icons that appear in the SAS Results Window -- every output that would normally go to ODS is a branch and every branch gets an IDX. This is represented in the Results Window as the main folder or node with the + sign next to it. That folder is a "branch". So when you use FILE PRINT ODS, your output will generate a branch and the IDX will increment. &lt;BR /&gt;
 &lt;BR /&gt;
  If I submit the following program:&lt;BR /&gt;
[pre]&lt;BR /&gt;
ods html file='c:\temp\look_at_IDX.html' style=sasweb;&lt;BR /&gt;
                      &lt;BR /&gt;
data _null_;&lt;BR /&gt;
  a = ' ';&lt;BR /&gt;
  file Print ods;&lt;BR /&gt;
  put _ods_;&lt;BR /&gt;
run;&lt;BR /&gt;
              &lt;BR /&gt;
proc print data=sashelp.class(obs=2);&lt;BR /&gt;
run;&lt;BR /&gt;
                     &lt;BR /&gt;
data _null_;&lt;BR /&gt;
  set sashelp.class(obs=3);&lt;BR /&gt;
  file Print ods;&lt;BR /&gt;
  put _ods_;&lt;BR /&gt;
run;&lt;BR /&gt;
&lt;BR /&gt;
ods html close;&lt;BR /&gt;
[/pre]&lt;BR /&gt;
                                       &lt;BR /&gt;
 Then I will get 3 "branches", one for each step-- and the resulting named anchors will be:&lt;BR /&gt;
[pre]&lt;BR /&gt;
&amp;lt;a name="IDX"&amp;gt;&lt;BR /&gt;
&amp;lt;a name="IDX1"&amp;gt;&lt;BR /&gt;
&amp;lt;a name="IDX2"&amp;gt;&lt;BR /&gt;
[/pre]&lt;BR /&gt;
...each one within its own "branch" and &amp;lt;div&amp;gt; tag.&lt;BR /&gt;
&lt;BR /&gt;
I didn't bother with a table template for my DATA _NULL_ because all I wanted to do was show that each "branch" got an IDX -- whether you used a TABLE template or now. &lt;BR /&gt;
 &lt;BR /&gt;
However, I can "force" the IDX to be a different number. I still don't know whether this is what you want to do. If you do this (using the ANCHOR= option), then the next anchor tag generated will start from that number. For example:&lt;BR /&gt;
[pre]&lt;BR /&gt;
                      &lt;BR /&gt;
data _null_;&lt;BR /&gt;
  a = ' ';&lt;BR /&gt;
  file Print ods;&lt;BR /&gt;
  put _ods_;&lt;BR /&gt;
run;&lt;BR /&gt;
              &lt;BR /&gt;
proc print data=sashelp.class(obs=2);&lt;BR /&gt;
run;&lt;BR /&gt;
                     &lt;BR /&gt;
data _null_;&lt;BR /&gt;
  set sashelp.class(obs=3);&lt;BR /&gt;
  file Print ods;&lt;BR /&gt;
  put _ods_;&lt;BR /&gt;
run;&lt;BR /&gt;
                                       &lt;BR /&gt;
ods html anchor='IDX15';&lt;BR /&gt;
run;&lt;BR /&gt;
                                 &lt;BR /&gt;
proc print data=sashelp.shoes(obs=3);&lt;BR /&gt;
run;&lt;BR /&gt;
                   &lt;BR /&gt;
proc freq data=sashelp.shoes;&lt;BR /&gt;
  tables region;&lt;BR /&gt;
run;&lt;BR /&gt;
               &lt;BR /&gt;
ods html close;&lt;BR /&gt;
[/pre]&lt;BR /&gt;
                  &lt;BR /&gt;
...will generate these named anchors in the file:&lt;BR /&gt;
[pre]&lt;BR /&gt;
&amp;lt;a name="IDX"&amp;gt;&lt;BR /&gt;
&amp;lt;a name="IDX1"&amp;gt;&lt;BR /&gt;
&amp;lt;a name="IDX2"&amp;gt;&lt;BR /&gt;
&amp;lt;a name="IDX15"&amp;gt;&lt;BR /&gt;
&amp;lt;a name="IDX16"&amp;gt;&lt;BR /&gt;
[/pre]&lt;BR /&gt;
                                         &lt;BR /&gt;
I'm still not sure I understand exactly why you need to increment anchor tags, but perhaps ANCHOR= will do what you want.&lt;BR /&gt;
 &lt;BR /&gt;
cynthia</description>
      <pubDate>Mon, 20 Sep 2010 04:16:15 GMT</pubDate>
      <guid>https://communities.sas.com/t5/ODS-and-Base-Reporting/Inserting-new-IDX-anchor/m-p/73006#M8313</guid>
      <dc:creator>Cynthia_sas</dc:creator>
      <dc:date>2010-09-20T04:16:15Z</dc:date>
    </item>
    <item>
      <title>Re: Inserting new IDX anchor</title>
      <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/Inserting-new-IDX-anchor/m-p/73007#M8314</link>
      <description>Here is the background, Cynthia:&lt;BR /&gt;
&lt;BR /&gt;
Each page has a menu with an entry per group and some other explanations at the top. I don't use frames, pages are part of a larger web site that handles the overall navigation.&lt;BR /&gt;
&lt;BR /&gt;
On a page, say I create 3 graphs for each group. I know for example the menu will be IDX, the explanations IDX1, and each group will be IDX2, IDX5, IDX8, etc. These anchors are what the menu uses.&lt;BR /&gt;
&lt;BR /&gt;
Now sometimes, graphs cannot be created. So I print a message (which uses one IDX, say IDX5) and I need 2 more increments so the next group, (at IDX8) will be navigated to properly from the menu.&lt;BR /&gt;
&lt;BR /&gt;
I need these dummy anchors because when I generate outputs, if there is no suitable data for a group, the menu pointing to the groups must be kept in sync. So I add "dummy" anchors to pad to the next group. &lt;BR /&gt;
&lt;BR /&gt;
Does this make sense?&lt;BR /&gt;
&lt;BR /&gt;
The anchor increment works fine, it is just that I don't know why it does .</description>
      <pubDate>Mon, 20 Sep 2010 05:07:10 GMT</pubDate>
      <guid>https://communities.sas.com/t5/ODS-and-Base-Reporting/Inserting-new-IDX-anchor/m-p/73007#M8314</guid>
      <dc:creator>ChrisNZ</dc:creator>
      <dc:date>2010-09-20T05:07:10Z</dc:date>
    </item>
    <item>
      <title>Re: Inserting new IDX anchor</title>
      <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/Inserting-new-IDX-anchor/m-p/73008#M8315</link>
      <description>Hi:&lt;BR /&gt;
  You said:&lt;BR /&gt;
&lt;B&gt;The anchor increment works fine, it is just that I don't know why it does . &lt;/B&gt;&lt;BR /&gt;
 &lt;BR /&gt;
And the reason it works only has a little to do with GENERIC=ON -- I can make the same thing happen by using PRINT=NO. &lt;BR /&gt;
&lt;BR /&gt;
Your DATA _NULL_ step makes a high-level node -- an object (folder icon) in the Result Window and a "branch" in the HTML file. It doesn't matter whether you use a table template or not (as my previous program illustrated. Any output that gets routed to ODS, whether with a DATA _NULL_ or a PROC step generally gets a named anchor in the ODS HTML file. If I make a TABLE template but with PRINT=NO instead of GENERIC=ON -- even though my DATA _NULL_ doesn't generate any output in the HTML file, I will still get a named anchor in the HTML file from this code:&lt;BR /&gt;
[pre]&lt;BR /&gt;
proc template;&lt;BR /&gt;
  define table IncrementIDX;&lt;BR /&gt;
  column a;&lt;BR /&gt;
    define a;&lt;BR /&gt;
      print=no;&lt;BR /&gt;
    end;&lt;BR /&gt;
  end;&lt;BR /&gt;
run;&lt;BR /&gt;
&lt;BR /&gt;
             &lt;BR /&gt;
title; footnote;&lt;BR /&gt;
ods html file='c:\temp\whatIDX.html' style=sasweb;&lt;BR /&gt;
proc print data=sashelp.class(obs=2);&lt;BR /&gt;
run;&lt;BR /&gt;
           &lt;BR /&gt;
data _null_;&lt;BR /&gt;
  a=1;&lt;BR /&gt;
  file print ods=(template='IncrementIDX');&lt;BR /&gt;
  put _ods_;&lt;BR /&gt;
run; &lt;BR /&gt;
           &lt;BR /&gt;
proc print data=sashelp.class(obs=2);&lt;BR /&gt;
run;&lt;BR /&gt;
ods html close;&lt;BR /&gt;
[/pre]&lt;BR /&gt;
 &lt;BR /&gt;
And the IDX/named anchors in the ODS HTML file will be:&lt;BR /&gt;
[pre]&lt;BR /&gt;
&amp;lt;a name="IDX"&amp;gt;     &amp;lt;---from 1st proc print&lt;BR /&gt;
&amp;lt;a name="IDX1"&amp;gt;   &amp;lt;---from DATA _NULL_&lt;BR /&gt;
&amp;lt;a name="IDX2"&amp;gt;   &amp;lt;---from 2nd proc print&lt;BR /&gt;
[/pre]&lt;BR /&gt;
                  &lt;BR /&gt;
When you use GENERIC=ON in the TABLE template, you are telling the TABLE template that you will be sending a variable from your dataset to the column. And normally, you do this because let's say you have a column in the template called "GENCOL" and you want to send that single column definition multiple numeric variables from your dataset -- in order to "reuse" the column definition. You would use the GENERIC column in this way:&lt;BR /&gt;
[pre]&lt;BR /&gt;
proc template;&lt;BR /&gt;
  define table Xtable;&lt;BR /&gt;
     column Region gencol;&lt;BR /&gt;
    &lt;BR /&gt;
     define Region;&lt;BR /&gt;
        header='Region';&lt;BR /&gt;
        just=c;&lt;BR /&gt;
        style=RowHeader;&lt;BR /&gt;
        format=$15.;&lt;BR /&gt;
     end;&lt;BR /&gt;
     define gencol;&lt;BR /&gt;
        header=_label_;&lt;BR /&gt;
        format=comma14.2;&lt;BR /&gt;
        generic;&lt;BR /&gt;
     end;&lt;BR /&gt;
  end;&lt;BR /&gt;
run;&lt;BR /&gt;
                         &lt;BR /&gt;
data _null_;&lt;BR /&gt;
  set sashelp.shoes(obs=3);&lt;BR /&gt;
  label sales='Sales'&lt;BR /&gt;
        inventory='Inventory'&lt;BR /&gt;
        returns='Returns';&lt;BR /&gt;
  file print &lt;BR /&gt;
       ods=(template='Xtable'&lt;BR /&gt;
            columns=(Region&lt;BR /&gt;
                     gencol=sales(generic=on)&lt;BR /&gt;
                     gencol=inventory(generic=on)&lt;BR /&gt;
                     gencol=returns(generic=on)));&lt;BR /&gt;
  put _ods_;&lt;BR /&gt;
run;&lt;BR /&gt;
[/pre]&lt;BR /&gt;
                 &lt;BR /&gt;
Note how I am sending GENCOL the SALES variable first, then the INVENTORY variable and then the RETURNS variable. But GENERIC is like a handshake, if you have GENERIC (or GENERIC=ON) in the TABLE template, you are expected to have GENERIC in the COLUMNS= specification. Since you invoke the TABLE template without completing the handshake, you are essentially creating an "empty" output object -- which is essentially doing the same as when I had PRINT=NO In my template.&lt;BR /&gt;
 &lt;BR /&gt;
If I  tried to use/create GENCOL in a DATA _NULL_ like this:&lt;BR /&gt;
[pre]&lt;BR /&gt;
data _null_;&lt;BR /&gt;
  set sashelp.shoes(obs=3);&lt;BR /&gt;
  label sales='Sales'&lt;BR /&gt;
        inventory='Inventory'&lt;BR /&gt;
        returns='Returns';&lt;BR /&gt;
  gencol=sales-inventory;&lt;BR /&gt;
  file print &lt;BR /&gt;
       ods=(template='Xtable'&lt;BR /&gt;
            columns=(Region&lt;BR /&gt;
                     gencol ));&lt;BR /&gt;
  put _ods_;&lt;BR /&gt;
run;&lt;BR /&gt;
[/pre]&lt;BR /&gt;
 &lt;BR /&gt;
Then I would only see REGION in the output because I did not send a value for GENCOL in the table template in the proper way. &lt;BR /&gt;
 &lt;BR /&gt;
cynthia</description>
      <pubDate>Mon, 20 Sep 2010 06:07:01 GMT</pubDate>
      <guid>https://communities.sas.com/t5/ODS-and-Base-Reporting/Inserting-new-IDX-anchor/m-p/73008#M8315</guid>
      <dc:creator>Cynthia_sas</dc:creator>
      <dc:date>2010-09-20T06:07:01Z</dc:date>
    </item>
    <item>
      <title>Re: Inserting new IDX anchor</title>
      <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/Inserting-new-IDX-anchor/m-p/73009#M8316</link>
      <description>Thank you for your very detailed and clear explanations Cynthia.&lt;BR /&gt;
&lt;BR /&gt;
I might even be getting my head around proc template...  &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;</description>
      <pubDate>Mon, 20 Sep 2010 22:15:52 GMT</pubDate>
      <guid>https://communities.sas.com/t5/ODS-and-Base-Reporting/Inserting-new-IDX-anchor/m-p/73009#M8316</guid>
      <dc:creator>ChrisNZ</dc:creator>
      <dc:date>2010-09-20T22:15:52Z</dc:date>
    </item>
    <item>
      <title>Re: Inserting new IDX anchor</title>
      <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/Inserting-new-IDX-anchor/m-p/73010#M8317</link>
      <description>Hi:&lt;BR /&gt;
  Perhaps this will help:&lt;BR /&gt;
&lt;A href="http://support.sas.com/resources/papers/proceedings09/227-2009.pdf" target="_blank"&gt;http://support.sas.com/resources/papers/proceedings09/227-2009.pdf&lt;/A&gt;&lt;BR /&gt;
    &lt;BR /&gt;
cynthia</description>
      <pubDate>Tue, 21 Sep 2010 00:10:05 GMT</pubDate>
      <guid>https://communities.sas.com/t5/ODS-and-Base-Reporting/Inserting-new-IDX-anchor/m-p/73010#M8317</guid>
      <dc:creator>Cynthia_sas</dc:creator>
      <dc:date>2010-09-21T00:10:05Z</dc:date>
    </item>
  </channel>
</rss>

