Using the HTML Formatting Tools

The HTML Formatting Tools are a collection of SAS macros that enable you to format and save SAS output, data, and log information for displaying in a Web browser. The Formatting Tools assign valid HTML tags to your data and output, creating customized HTML files. The HTML files that you create are static pages that you can publish using a Web server. Publishing your SAS data and output using the Web is a convenient and effective way to share information.

You should consider using these tools if your users have access to a Web browser and any of the following statements are true:

To get an idea of the types of output that you can generate, take a look at some of the examples that use the formatters.

How the Formatters Work

The HTML Formatting Tools consist of three formatters; each designed to format a particular type of SAS data or output. When you install the Formatting Tools, you install all three formatters. You decide which formatter you want to use and call that macro specifically.

Each formatter relies on a set of defined properties, a list of tag definitions, and input from you to format your data or output. A default set property list is provided with each formatter, but only one list of tag definitions is provided. You can use the default property and tag information to quickly create your first HTML output. As you become more familiar with HTML and the Formatting Tools, you can create custom output by:

All of these possiblilites are discussed in Formatting the Results of the HTML Formatting Tools. Before you go off to learn how to create custom reports, take a look at the remaining information in this section. It explains ways you can run the formatters and some of the additional tools available with the HTML Formatting Tools.

Using the Macro Syntax

Each formatter is a SAS macro that you can include in your SAS programs or submit using the Program Editor. The syntax for each macro contains arguments that:

Using the available arugments, you can create customized output without having to create a new property list or define new tag descriptions. If you find that you are making the same formatting specifications over and over, you may want to save these specifications in a custom property list.

Using the macro syntax to capture output or format data is referred to as running in batch mode. You can also use the the Formatting Tools in interactive mode, as described in the next section.

When you are using the Output or Tabulate Formatters in batch mode, they capture the output as SAS software produces it. This means that output is written to the specified HTML file only. Since you control when capturing is turned on and off, you can capture portions of the output and ignore other portions. You can also use multiple formatter macros within the same SAS program. (Remember that each formatter is designed for a specific type of SAS output or data.)

Using the FRAME Interface

Interactive mode refers to using the SAS/AF FRAME interface provided with each of the formatters. Using the FRAME interface enables you to select options for elements that you want to format without having to know the formatter syntax. The FRAME interface is available for use with Release 6.12 of SAS software only. The Formatting Tools are supported in Version 7 of SAS software, but you should use them in batch mode only.

Interactive mode saves the information that is in Output or Log window to the specified HTML file. If your Output or Log window contains information other than the output you want to capture, there is no way to tell the formatter to ignore the unwanted information. Also, if the Output or Log window contains output other than what the formatter expects, the formatter might generate errors or produce unexpected results.

________________________

For complete documentation that is specific to a formatter, see the following: