Generating Web Presentations

There are two basic methods in which you can generate a Web presentation: using the ODS HTML destination with a SAS/GRAPH procedure, or using the DS2TREE or DS2CONST macro.

Using ODS HTML with a SAS/GRAPH Procedure

The recommended method for getting procedure output on the Web is with ODS. By using the ODS HTML statement in a program with one or more SAS/GRAPH procedures, you can create an HTML file and its associated SAS/GRAPH (or tabular) output.
By default, the HTML destination is open, so you can create HTML output simply by submitting SAS code. In order for SAS to release the file, you will need to close the HTML destination.
To send output to the HTML destination, the easiest way to do this is:
  1. Close the HTML destination.
  2. Use an ODS HTML statement to open the HTML destination, and use the BODY= option to specify a name for your output HTML file. For device drivers that generate image output files, use the PATH= option to ensure that all output files are stored in the same location.
  3. Run a graphics procedure. If your procedure supports run-group processing, be sure include a QUIT statement.
  4. Close the HTML destination to write your HTML file.
If the LISTING destination is open, then SAS/GRAPH creates an additional copy of your output. To improve performance, you might want to close the LISTING destination while you are generating Web output.

Using DS2TREE and DS2CONST Macros

The following macros generate a Web presentation from a SAS data set:
  • DS2TREE generates treeview diagrams
  • DS2CONST generates constellation diagrams.
To use these macros, simply define your data, and then call one of these macros using the appropriate options. For these macros, you do not use ODS or call a SAS/GRAPH procedure. For additional information, refer to Creating Interactive Treeview Diagrams and Creating Interactive Constellation Diagrams.