The SAS Output Delivery System and reporting techniques

ODS HTML Output Size

Posts: 0

ODS HTML Output Size

I wonder if there is any COMPRESS=YES type option for the HTML output.

It doesn't look like STYLE=MINIMAL cut down the html file size considerably.

At some point CHTML was suggested, but I don't know if the C stands for Compact or Compressed.

Thank you very much and TGIF!
Super Contributor
Super Contributor
Posts: 3,174

Re: ODS HTML Output Size

Without seeing your code, you may want to also consider the benefit of using the ODS parameter NEWFILE= , if you are generating a CONTENTS, FRAME and BODY set of members for your HTML/web content. This parameter can help reduce the HTML document file-size, but only under certains circumstances (and SAS PROCs).

Check the SAS support website and search on related keywords and/or phrases to find relevant DOC and other useful FAQs, technical papers and material.

Scott Barry
SBBWorks, Inc.
Posts: 8,740

Re: ODS HTML Output Size

CHTML stands for "compact" HTML -- it is COMPACT because it has NO style embedded in the HTML file. In SAS 8, HTML files were large because the style attributes were pumped into every HTML tag. In SAS 9, HTML files can be large because of the in-line style section that is part of the HTML 4 spec.

In SAS 8, you could use the STYLESHEET=(URL=) option to point to an external CSS file -- this would cause ODS HTML to build a <LINK> tag that merely pointed to the CSS location -- then when the browser loaded the file, the CSS file would load separately from the HTML file -- this generally resulted in a smaller HTML file.

In SAS 9, all HTML style are "inline" by default. That means, if you open your HTML file with Notepad (do a View --> Source in the browser), you will see that there is a <STYLE> section inside the ODS-generated HTML file. This inline style section CAN make your HTML files large -- however, they should be smaller than they were when generated in SAS 8.

Again, using the STYLESHEET=(URL=) option allows you to point to an external CSS file -- this should make the HTML file smaller.

Only PDF has a COMPRESS= option to implement compression on files created with ODS.

Ask a Question
Discussion stats
  • 2 replies
  • 3 in conversation