<?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: Proc template with columns &amp; header in ODS and Base Reporting</title>
    <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/Proc-template-with-columns-header/m-p/5761#M2326</link>
    <description>I'm still stuck to my previous idea, how much clever and wise hints from Cynthia may be.&lt;BR /&gt;
Here is an example of what I was referring to : IFRAME tagset in a data-step-generated main HTML page. [pre]&lt;BR /&gt;
ODS HTML PATH = "c:\temp" (URL=NONE)&lt;BR /&gt;
	 CONTENTS = "contents.htm"&lt;BR /&gt;
	  	FRAME = "with_frames.htm"&lt;BR /&gt;
		 BODY = "body.htm"&lt;BR /&gt;
		STYLE = astronomy ;&lt;BR /&gt;
PROC MEANS DATA = sashelp.prdsale MEAN MEDIAN ;&lt;BR /&gt;
	VAR actual ;&lt;BR /&gt;
	CLASS country product ;&lt;BR /&gt;
	WAYS 1 ;&lt;BR /&gt;
RUN ;&lt;BR /&gt;
ODS HTML CLOSE ;&lt;BR /&gt;
DATA _NULL_ ;&lt;BR /&gt;
	FILE "c:\temp\no_frames.htm" ;&lt;BR /&gt;
	PUT "" ;&lt;BR /&gt;
	PUT "&lt;TABLE border="0" width="100%" height="100%"&gt;" ;&lt;BR /&gt;
	PUT "&lt;TBODY&gt;&lt;TR&gt;" ;&lt;BR /&gt;
	PUT "&lt;TD width="30%"&gt;" ;&lt;BR /&gt;
	PUT "&lt;IFRAME name="contents" src="https://communities.sas.com/contents.htm" height="100%" width="100%" frameborder="0"&gt;&lt;/IFRAME&gt;" ;&lt;BR /&gt;
	PUT "&lt;/TD&gt;" ;&lt;BR /&gt;
	PUT "&lt;TD width="70%"&gt;" ;&lt;BR /&gt;
	PUT "&lt;IFRAME name="body" src="https://communities.sas.com/body.htm" height="100%" width="100%" frameborder="0"&gt;&lt;/IFRAME&gt;" ;&lt;BR /&gt;
	PUT "&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;" ;&lt;BR /&gt;
RUN ;&lt;BR /&gt;
[/pre]&lt;BR /&gt;
It approximately looks like the framed main page produced by the ODS HTML statement, doesn't it ?&lt;BR /&gt;
Regards,&lt;BR /&gt;
Olivier</description>
    <pubDate>Sat, 01 Dec 2007 16:01:01 GMT</pubDate>
    <dc:creator>Olivier</dc:creator>
    <dc:date>2007-12-01T16:01:01Z</dc:date>
    <item>
      <title>Proc template with columns &amp; header</title>
      <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/Proc-template-with-columns-header/m-p/5758#M2323</link>
      <description>Our web site does not allow frames.  The ODS HTML system can easily create a frames setup with a contents, page, and table file completely set up. I need to create the same look, but on the same page and, with a header logo.  I assume that means I need a table into which each of the content, page, and stat tables are entered.  Can proc template be used to create such a setup?  Does anyone have such a template style?</description>
      <pubDate>Fri, 30 Nov 2007 12:11:30 GMT</pubDate>
      <guid>https://communities.sas.com/t5/ODS-and-Base-Reporting/Proc-template-with-columns-header/m-p/5758#M2323</guid>
      <dc:creator>JohnH</dc:creator>
      <dc:date>2007-11-30T12:11:30Z</dc:date>
    </item>
    <item>
      <title>Re: Proc template with columns &amp; header</title>
      <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/Proc-template-with-columns-header/m-p/5759#M2324</link>
      <description>Maybe you could create your own "main" page, using the IFRAME tag instead of the frame panels.&lt;BR /&gt;
I don't have examples so far, but check a little help on the tag and build the HTML document with a DATA _NULL_ step...&lt;BR /&gt;
&lt;BR /&gt;
Regards,&lt;BR /&gt;
Olivier</description>
      <pubDate>Fri, 30 Nov 2007 12:19:39 GMT</pubDate>
      <guid>https://communities.sas.com/t5/ODS-and-Base-Reporting/Proc-template-with-columns-header/m-p/5759#M2324</guid>
      <dc:creator>Olivier</dc:creator>
      <dc:date>2007-11-30T12:19:39Z</dc:date>
    </item>
    <item>
      <title>Re: Proc template with columns &amp; header</title>
      <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/Proc-template-with-columns-header/m-p/5760#M2325</link>
      <description>Hi:&lt;BR /&gt;
  You would either have to design your own custom TAGSET template for HTML in order to generate the custom tags you need. What you want to do is NOT a style change -- it is not the style template that builds multiple, linked files -- that happens in the generated HTML tags -- which means you'd have to change the TAGSET template to work differently than it does. Or you would have to generate the kind of HTML tags you want in a DATA step program.&lt;BR /&gt;
&lt;BR /&gt;
The trick with generating your own tagset is that ODS builds hyperlinks to link the CONTENTS=/PAGE= file with the BODY= file. For example, ODS would build this link for a PROC UNIVARIATE table for Basic Measures:&lt;BR /&gt;
&amp;lt;a href="body.html#IDX1" target="body"&amp;gt;Basic Measures of Location and Variability&amp;lt;/a&amp;gt; -- which would be completely wrong if you were dumping both the body output and the contents output into the same file....the body.html would be wrong and the target="body" would also be wrong -- you'd have some work to do to get what you want.&lt;BR /&gt;
 &lt;BR /&gt;
If an HTML frame is not appropriate, how about delivering a PDF file -- where the bookmark area in the PDF file would be the equivalent of the HTML contents file??? Most browsers these days have Acrobat Reader. &lt;BR /&gt;
 &lt;BR /&gt;
cynthia</description>
      <pubDate>Fri, 30 Nov 2007 19:52:59 GMT</pubDate>
      <guid>https://communities.sas.com/t5/ODS-and-Base-Reporting/Proc-template-with-columns-header/m-p/5760#M2325</guid>
      <dc:creator>Cynthia_sas</dc:creator>
      <dc:date>2007-11-30T19:52:59Z</dc:date>
    </item>
    <item>
      <title>Re: Proc template with columns &amp; header</title>
      <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/Proc-template-with-columns-header/m-p/5761#M2326</link>
      <description>I'm still stuck to my previous idea, how much clever and wise hints from Cynthia may be.&lt;BR /&gt;
Here is an example of what I was referring to : IFRAME tagset in a data-step-generated main HTML page. [pre]&lt;BR /&gt;
ODS HTML PATH = "c:\temp" (URL=NONE)&lt;BR /&gt;
	 CONTENTS = "contents.htm"&lt;BR /&gt;
	  	FRAME = "with_frames.htm"&lt;BR /&gt;
		 BODY = "body.htm"&lt;BR /&gt;
		STYLE = astronomy ;&lt;BR /&gt;
PROC MEANS DATA = sashelp.prdsale MEAN MEDIAN ;&lt;BR /&gt;
	VAR actual ;&lt;BR /&gt;
	CLASS country product ;&lt;BR /&gt;
	WAYS 1 ;&lt;BR /&gt;
RUN ;&lt;BR /&gt;
ODS HTML CLOSE ;&lt;BR /&gt;
DATA _NULL_ ;&lt;BR /&gt;
	FILE "c:\temp\no_frames.htm" ;&lt;BR /&gt;
	PUT "" ;&lt;BR /&gt;
	PUT "&lt;TABLE border="0" width="100%" height="100%"&gt;" ;&lt;BR /&gt;
	PUT "&lt;TBODY&gt;&lt;TR&gt;" ;&lt;BR /&gt;
	PUT "&lt;TD width="30%"&gt;" ;&lt;BR /&gt;
	PUT "&lt;IFRAME name="contents" src="https://communities.sas.com/contents.htm" height="100%" width="100%" frameborder="0"&gt;&lt;/IFRAME&gt;" ;&lt;BR /&gt;
	PUT "&lt;/TD&gt;" ;&lt;BR /&gt;
	PUT "&lt;TD width="70%"&gt;" ;&lt;BR /&gt;
	PUT "&lt;IFRAME name="body" src="https://communities.sas.com/body.htm" height="100%" width="100%" frameborder="0"&gt;&lt;/IFRAME&gt;" ;&lt;BR /&gt;
	PUT "&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;" ;&lt;BR /&gt;
RUN ;&lt;BR /&gt;
[/pre]&lt;BR /&gt;
It approximately looks like the framed main page produced by the ODS HTML statement, doesn't it ?&lt;BR /&gt;
Regards,&lt;BR /&gt;
Olivier</description>
      <pubDate>Sat, 01 Dec 2007 16:01:01 GMT</pubDate>
      <guid>https://communities.sas.com/t5/ODS-and-Base-Reporting/Proc-template-with-columns-header/m-p/5761#M2326</guid>
      <dc:creator>Olivier</dc:creator>
      <dc:date>2007-12-01T16:01:01Z</dc:date>
    </item>
    <item>
      <title>Re: Proc template with columns &amp; header</title>
      <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/Proc-template-with-columns-header/m-p/5762#M2327</link>
      <description>Hi, Olivier...&lt;BR /&gt;
&lt;BR /&gt;
I knew what you meant, but I took the first sentence&lt;BR /&gt;
&lt;B&gt;"Our web site does not allow frames."&lt;/B&gt;&lt;BR /&gt;
 to mean ALL frames, including inline-frames. If the web folks will allow in-line frames, then your method is indeed the better method. &lt;BR /&gt;
&lt;BR /&gt;
If the web folks will NOT allow in-line frames, then there is a way to create BODY.HTM and CONTENTS.HTM and then essentially use a DATA _NULL_ step to concatenate the 2 files together. &lt;BR /&gt;
&lt;BR /&gt;
The trick is to create the CONTENTS.HTM file WITH the TOP HTML tags, but WITHOUT the bottom HTML tags, and to create the BODY.HTM WITHOUT the TOP HTML tags, but WITH the bottom HTML tags. That way, when you concatenate the 2 files together, in a simple format, you have the TOC at the top, immediately followed by the BODY content..clicking on links at the top take you further down on the page. &lt;BR /&gt;
&lt;BR /&gt;
This method doesn't use FRAMES or IFRAMES at all -- but like your program, does do some post-processing to get the 2 files concatenated together. (You could do some fancier processing in the DATA _NULL_ to get 2 tables side-by-side, but the example I have is a simple concatenate.&lt;BR /&gt;
 &lt;BR /&gt;
cynthia</description>
      <pubDate>Sat, 01 Dec 2007 19:36:07 GMT</pubDate>
      <guid>https://communities.sas.com/t5/ODS-and-Base-Reporting/Proc-template-with-columns-header/m-p/5762#M2327</guid>
      <dc:creator>Cynthia_sas</dc:creator>
      <dc:date>2007-12-01T19:36:07Z</dc:date>
    </item>
    <item>
      <title>Re: Proc template with columns &amp; header</title>
      <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/Proc-template-with-columns-header/m-p/5763#M2328</link>
      <description>Cynthia - You are correct.  We cannot have inline frames either. I will try your ideas when I get a chance.  Thanks to all of you for your ideas.</description>
      <pubDate>Mon, 03 Dec 2007 12:46:53 GMT</pubDate>
      <guid>https://communities.sas.com/t5/ODS-and-Base-Reporting/Proc-template-with-columns-header/m-p/5763#M2328</guid>
      <dc:creator>JohnH</dc:creator>
      <dc:date>2007-12-03T12:46:53Z</dc:date>
    </item>
    <item>
      <title>Re: Proc template with columns &amp; header</title>
      <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/Proc-template-with-columns-header/m-p/5764#M2329</link>
      <description>John:&lt;BR /&gt;
  Here's the code sample I described. It was for someone who wanted the TOC info at the top of the BODY info. The key is to change target="body" from the TOC file into target="_self" (otherwise, you're popping up windows every time you click on a link) and to change the file name in the HREF from the ORIGINAL file name (BODY.HTML) to the NEW name (NEWBOTH.HTML). Then, you can get rid of the original HTML files you created and use the new HTML file (NEWBOTH.HTML) on your web site.&lt;BR /&gt;
 &lt;BR /&gt;
cynthia&lt;BR /&gt;
[pre]&lt;BR /&gt;
** create contents and body file only;&lt;BR /&gt;
** do not even create a FRAME= file;&lt;BR /&gt;
** keep &lt;STYLE&gt; section and top tags in CONTENTS file (with NOBOT), ;&amp;lt;br&amp;gt;
**      but suppress bottom HTML tags in this file;&amp;lt;br&amp;gt;
** suppress &amp;lt;style&amp;gt; and top tags in the BODY file (with NOTOP), ;&amp;lt;br&amp;gt;
**      but leave the bottom tags in this file;&amp;lt;br&amp;gt;
  &amp;lt;br&amp;gt;
ods html path='c:\temp\frame_stuff' (url=none)&amp;lt;br&amp;gt;
         contents='contents.html' (nobot) rs=none&amp;lt;br&amp;gt;
         file='body.html' (notop) rs=none&amp;lt;br&amp;gt;
         style=sasweb;&amp;lt;br&amp;gt;
   &amp;lt;br&amp;gt;
  ** proc freq creates 1 output object;&amp;lt;br&amp;gt;
  ** proc univariate creates 5 output objects;&amp;lt;br&amp;gt;
    &amp;lt;br&amp;gt;
proc freq data=sashelp.shoes;&amp;lt;br&amp;gt;
  title 'Proc Freq';&amp;lt;br&amp;gt;
  table subsidiary /nocum nopercent;&amp;lt;br&amp;gt;
run;&amp;lt;br&amp;gt;
   &amp;lt;br&amp;gt;
proc univariate data=sashelp.shoes;&amp;lt;br&amp;gt;
  title 'Proc Univariate';&amp;lt;br&amp;gt;
  where region in ('Asia', 'Canada');&amp;lt;br&amp;gt;
  var sales;&amp;lt;br&amp;gt;
run;&amp;lt;br&amp;gt;
ods html close;&amp;lt;br&amp;gt;
    &amp;lt;br&amp;gt;
** now, concatenate the TOC and BOD files together; &amp;lt;br&amp;gt;
** into a new file with a few changes;&amp;lt;br&amp;gt;
filename toc 'c:\temp\frame_stuff\contents.html' ;&amp;lt;br&amp;gt;
filename bod 'c:\temp\frame_stuff\body.html' ;&amp;lt;br&amp;gt;
filename newboth 'c:\temp\frame_stuff\newboth.html' ;&amp;lt;br&amp;gt;
   &amp;lt;br&amp;gt;
data _null_;&amp;lt;br&amp;gt;
length tmpline tocline bodline $300;&amp;lt;br&amp;gt;
  infile toc length=tlg end=eof_toc;&amp;lt;br&amp;gt;
  do until (eof_toc=1);&amp;lt;br&amp;gt;
    input tocline $varying. tlg;&amp;lt;br&amp;gt;
    &amp;lt;br&amp;gt;
    ** change body.html (orig) to newboth.html (new) in link;&amp;lt;br&amp;gt;
    gotbd = index(tocline,'body.html');&amp;lt;br&amp;gt;
    if gotbd gt 1 then do;&amp;lt;br&amp;gt;
       tmpline = substr(tocline,1,gotbd-1) ||&amp;lt;br&amp;gt;
                 'newboth.html' ||&amp;lt;br&amp;gt;
                 substr(tocline,gotbd+9);&amp;lt;br&amp;gt;
       tlg = length(trim(tmpline));&amp;lt;br&amp;gt;
       tocline = trim(tmpline);&amp;lt;br&amp;gt;
    end;&amp;lt;br&amp;gt;
    &amp;lt;br&amp;gt;
    ** get rid of target="body" in link;&amp;lt;br&amp;gt;
    ** and replace it with target="_self";&amp;lt;br&amp;gt;
    ** which will keep all navigation within the newboth.html file;&amp;lt;br&amp;gt;
    gottb = index(tocline,'target="body"');&amp;lt;br&amp;gt;
    if gottb gt 1 then do;&amp;lt;br&amp;gt;
       tmpline = substr(tocline,1,gottb-1) ||&amp;lt;br&amp;gt;
                 'target="_self"' ||&amp;lt;br&amp;gt;
                 substr(tocline,gottb+13);&amp;lt;br&amp;gt;
       tlg = length(trim(tmpline));&amp;lt;br&amp;gt;
       tocline = trim(tmpline);&amp;lt;br&amp;gt;
    end;&amp;lt;br&amp;gt;
 &amp;lt;br&amp;gt;
    ** after making changes, now write out the tocline;&amp;lt;br&amp;gt;
    file newboth;&amp;lt;br&amp;gt;
    put tocline $varying. tlg;&amp;lt;br&amp;gt;
    ** put a horizontal rule tag as a divider after the TOC;&amp;lt;br&amp;gt;
    if eof_toc = 1 then put '&amp;lt;hr/&amp;gt;';&amp;lt;br&amp;gt;
  end;&amp;lt;br&amp;gt;
           &amp;lt;br&amp;gt;
  ** at end of TOC file, read orig bod file;&amp;lt;br&amp;gt;
  ** and write it out to the new file being created;&amp;lt;br&amp;gt;
  ** this is a simple read and write -- no changes needed to this file;&amp;lt;br&amp;gt;
  infile bod length=blg end=eof_bod;&amp;lt;br&amp;gt;
  do until (eof_bod=1);&amp;lt;br&amp;gt;
    input bodline $varying. blg;&amp;lt;br&amp;gt;
    file newboth;&amp;lt;br&amp;gt;
    put bodline $varying. blg;&amp;lt;br&amp;gt;
  end;&amp;lt;br&amp;gt;
run;&amp;lt;br&amp;gt;
[/pre]&amp;lt;br&amp;gt;
[/pre]&lt;/STYLE&gt;</description>
      <pubDate>Mon, 03 Dec 2007 18:54:03 GMT</pubDate>
      <guid>https://communities.sas.com/t5/ODS-and-Base-Reporting/Proc-template-with-columns-header/m-p/5764#M2329</guid>
      <dc:creator>Cynthia_sas</dc:creator>
      <dc:date>2007-12-03T18:54:03Z</dc:date>
    </item>
    <item>
      <title>Re: Proc template with columns &amp; header</title>
      <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/Proc-template-with-columns-header/m-p/5765#M2330</link>
      <description>I have a tagset that floats the table of contents either as a pulldown menu or as a tree in the upper&lt;BR /&gt;
left corner of the body file.&lt;BR /&gt;
&lt;BR /&gt;
I think that will do what you want.  If you send me an email I will send it to you.&lt;BR /&gt;
&lt;BR /&gt;
Eric.</description>
      <pubDate>Tue, 04 Dec 2007 19:08:59 GMT</pubDate>
      <guid>https://communities.sas.com/t5/ODS-and-Base-Reporting/Proc-template-with-columns-header/m-p/5765#M2330</guid>
      <dc:creator>Eric_SAS</dc:creator>
      <dc:date>2007-12-04T19:08:59Z</dc:date>
    </item>
    <item>
      <title>Re: Proc template with columns &amp; header</title>
      <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/Proc-template-with-columns-header/m-p/5766#M2331</link>
      <description>My email is Eric.Gebhart@sas.com...</description>
      <pubDate>Tue, 04 Dec 2007 19:10:18 GMT</pubDate>
      <guid>https://communities.sas.com/t5/ODS-and-Base-Reporting/Proc-template-with-columns-header/m-p/5766#M2331</guid>
      <dc:creator>Eric_SAS</dc:creator>
      <dc:date>2007-12-04T19:10:18Z</dc:date>
    </item>
  </channel>
</rss>

