<?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: ODS HTML HeadText gets truncated in ODS and Base Reporting</title>
    <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/ODS-HTML-HeadText-gets-truncated/m-p/770401#M25321</link>
    <description>&lt;P&gt;The &amp;gt; 256 character was for including a number of external javascript libraries.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I was able to get around the issue by placing some of the &amp;lt;script&amp;gt; tags at the bottom of the html&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Example:&lt;/P&gt;
&lt;PRE&gt;filename htmlout "great-page.html";

ods html body=htmlout (NO_BOTTOM_MATTER) style=plateau
  headtext='&amp;lt;link rel="stylesheet" href="https://cdn.datatables.net/1.11.0/css/jquery.dataTables.min.css"&amp;gt;'
;

* tagattr is IMPORTANT;
proc print data=sashelp.class  style(table)=[tagattr='id="MyTable1"'];
run;

ods html close;
&lt;BR /&gt;* stuff that would not fit in html HEADTEXT limit of 256 characters;
data _null_;
  file htmlout MOD;
  put
    '&amp;lt;script src="https://code.jquery.com/jquery-3.6.0.min.js" integrity="sha256-/xUj+3OJU5yExlq6GSYGSHk7tPXikynS7ogEvDej/m4=" crossorigin="anonymous"&amp;gt;&amp;lt;/script&amp;gt;'
  / '&amp;lt;script src="https://cdn.datatables.net/1.11.0/js/jquery.dataTables.min.js"&amp;gt;&amp;lt;/script&amp;gt;'
  / '&amp;lt;script&amp;gt;'
  / '$(document).ready(function(){'
  / '  debugger;'
  / '  $("#MyTable1").DataTable({paging: false});'
  / '})'
  / '&amp;lt;/script&amp;gt;'
  ;
  put
    '&amp;lt;/body&amp;gt;'
  ;
run;&lt;/PRE&gt;</description>
    <pubDate>Sat, 25 Sep 2021 11:54:45 GMT</pubDate>
    <dc:creator>RichardDeVen</dc:creator>
    <dc:date>2021-09-25T11:54:45Z</dc:date>
    <item>
      <title>ODS HTML HeadText gets truncated</title>
      <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/ODS-HTML-HeadText-gets-truncated/m-p/765683#M25282</link>
      <description>&lt;P&gt;The following code produces HTML wherein the specified headtext gets truncated to 256 characters.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Q: Does any know how to increase the allowed headtext or otherwise inject such?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;SAS program specifying a head text of 320 characters&lt;/P&gt;
&lt;PRE&gt;options lrecl=32000;  * does nothing for me regarding headtext! ;

ods html 
  path='.'
  file = 'sample.html'
  style=plateau
  headtext=
'&amp;lt;!--5678901234567890123456789012345678901234567890123456789012345678901234567890
12345678901234567890123456789012345678901234567890123456789012345678901234567890
12345678901234567890123456789012345678901234567890123456789012345678901234567890
12345678901234567890123456789012345678901234567890123456789012345678901234567--&amp;gt;'
;

proc print data=sashelp.class;
run;

ods html close;&lt;/PRE&gt;
&lt;P&gt;HTML output source with headtext truncated to 256 characters&lt;/P&gt;
&lt;PRE&gt;&amp;lt;!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"&amp;gt;
&amp;lt;html&amp;gt;
&amp;lt;head&amp;gt;
&amp;lt;!--567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456
&amp;lt;meta name="Generator" content="SAS Software Version 9.4, see www.sas.com"&amp;gt;
&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 02 Sep 2021 17:01:40 GMT</pubDate>
      <guid>https://communities.sas.com/t5/ODS-and-Base-Reporting/ODS-HTML-HeadText-gets-truncated/m-p/765683#M25282</guid>
      <dc:creator>RichardDeVen</dc:creator>
      <dc:date>2021-09-02T17:01:40Z</dc:date>
    </item>
    <item>
      <title>Re: ODS HTML HeadText gets truncated</title>
      <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/ODS-HTML-HeadText-gets-truncated/m-p/765694#M25283</link>
      <description>&lt;P&gt;From the documentation for ODS HTML ( I added some emphasis). I don't know if that a general HTML limit or SAS ODS limit.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;DIV class="xis-eDocBody"&gt;
&lt;DIV class="xis-refDictEntry"&gt;
&lt;DIV class="xis-syntax"&gt;
&lt;DIV class="xis-syntaxDescription"&gt;
&lt;DIV class="xis-optionalArgGroup"&gt;
&lt;DIV id="p0unihljo8oibqn1htfr8p9a084a" class="xis-argDescriptionPair"&gt;
&lt;H4 class="xis-argument"&gt;HEADTEXT= '&lt;SPAN class="xis-userSuppliedValue"&gt;markup-document-head&lt;/SPAN&gt;'&lt;/H4&gt;
&lt;DIV class="xis-argumentDescription"&gt;
&lt;P class="xis-paraSimple"&gt;specifies markup tags to place between the &amp;lt; HEAD&amp;gt; and &amp;lt; /HEAD&amp;gt; tags in all of the output files.&lt;/P&gt;
&lt;DIV id="n1tn2rj3atifd4n1m9n1ig3zmd23" class="xis-argDescriptionPair"&gt;
&lt;H4 class="xis-argument"&gt;&lt;SPAN class="xis-userSuppliedValue"&gt;markup-document-head&lt;/SPAN&gt;&lt;/H4&gt;
&lt;DIV class="xis-argumentDescription"&gt;
&lt;P class="xis-paraSimpleFirst"&gt;specifies the markup tags to place between the &amp;lt; HEAD&amp;gt; and &amp;lt; /HEAD&amp;gt; tags.&lt;/P&gt;
&lt;TABLE class="xis-summary"&gt;
&lt;TBODY&gt;
&lt;TR&gt;
&lt;TD class="xis-restriction"&gt;Restriction&lt;/TD&gt;
&lt;TD class="xis-summaryText"&gt;HEADTEXT= &lt;FONT color="#FF0000"&gt;&lt;STRONG&gt;cannot exceed 256 characters&lt;/STRONG&gt;&lt;/FONT&gt;.&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD class="xis-requirement"&gt;Requirement&lt;/TD&gt;
&lt;TD class="xis-summaryText"&gt;You must enclose &lt;SPAN class="xis-userSuppliedValue"&gt;markup-document-head&lt;/SPAN&gt; in quotation marks.&lt;/TD&gt;
&lt;/TR&gt;
&lt;/TBODY&gt;
&lt;/TABLE&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;TABLE class="xis-summary"&gt;
&lt;TBODY&gt;
&lt;TR&gt;
&lt;TD rowspan="2" class="xis-summaryTip"&gt;Tips&lt;/TD&gt;
&lt;TD class="xis-summaryText"&gt;ODS cannot parse the markup that you supply. It should be well-formed markup that is correct in the context of the &amp;lt;HEAD&amp;gt; and &amp;lt;/HEAD&amp;gt; tags.&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD class="xis-summaryText"&gt;Use the HEADTEXT= option to define programs (such as JavaScript) that you can use later in the file.&lt;/TD&gt;
&lt;/TR&gt;
&lt;/TBODY&gt;
&lt;/TABLE&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;</description>
      <pubDate>Thu, 02 Sep 2021 17:33:46 GMT</pubDate>
      <guid>https://communities.sas.com/t5/ODS-and-Base-Reporting/ODS-HTML-HeadText-gets-truncated/m-p/765694#M25283</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2021-09-02T17:33:46Z</dc:date>
    </item>
    <item>
      <title>Re: ODS HTML HeadText gets truncated</title>
      <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/ODS-HTML-HeadText-gets-truncated/m-p/770401#M25321</link>
      <description>&lt;P&gt;The &amp;gt; 256 character was for including a number of external javascript libraries.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I was able to get around the issue by placing some of the &amp;lt;script&amp;gt; tags at the bottom of the html&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Example:&lt;/P&gt;
&lt;PRE&gt;filename htmlout "great-page.html";

ods html body=htmlout (NO_BOTTOM_MATTER) style=plateau
  headtext='&amp;lt;link rel="stylesheet" href="https://cdn.datatables.net/1.11.0/css/jquery.dataTables.min.css"&amp;gt;'
;

* tagattr is IMPORTANT;
proc print data=sashelp.class  style(table)=[tagattr='id="MyTable1"'];
run;

ods html close;
&lt;BR /&gt;* stuff that would not fit in html HEADTEXT limit of 256 characters;
data _null_;
  file htmlout MOD;
  put
    '&amp;lt;script src="https://code.jquery.com/jquery-3.6.0.min.js" integrity="sha256-/xUj+3OJU5yExlq6GSYGSHk7tPXikynS7ogEvDej/m4=" crossorigin="anonymous"&amp;gt;&amp;lt;/script&amp;gt;'
  / '&amp;lt;script src="https://cdn.datatables.net/1.11.0/js/jquery.dataTables.min.js"&amp;gt;&amp;lt;/script&amp;gt;'
  / '&amp;lt;script&amp;gt;'
  / '$(document).ready(function(){'
  / '  debugger;'
  / '  $("#MyTable1").DataTable({paging: false});'
  / '})'
  / '&amp;lt;/script&amp;gt;'
  ;
  put
    '&amp;lt;/body&amp;gt;'
  ;
run;&lt;/PRE&gt;</description>
      <pubDate>Sat, 25 Sep 2021 11:54:45 GMT</pubDate>
      <guid>https://communities.sas.com/t5/ODS-and-Base-Reporting/ODS-HTML-HeadText-gets-truncated/m-p/770401#M25321</guid>
      <dc:creator>RichardDeVen</dc:creator>
      <dc:date>2021-09-25T11:54:45Z</dc:date>
    </item>
  </channel>
</rss>

