Managing ODS Destinations


ODS supports multiple destinations for procedure output. When using ODS with SAS/GRAPH, you manage two of those locations: the listing destination, which is the destination that receives traditional SAS output, and the HTML destination, which receives the HTML and image files needed for Web output.

ODS destinations can be open or closed. When a destination is open, ODS can send output to it, and when a destination is closed, ODS cannot send output to it. An open destination always uses system resources.

By default, the listing destination is open and the HTML destination is closed. Specifying an ODS statement that generates HTML output opens the HTML destination, but it has no effect on the listing destination, which remains open unless you explicitly close it.

When using SAS/GRAPH procedures with ODS, you should conserve system resources by closing the listing destination before issuing the ODS statement. After generating ODS output, you must close the HTML destination before you can view that output. A typical ODS session with SAS/GRAPH should be structured like this:

 /* specify the output location */  filename odsout '  path-to-Web-server  ';  goptions device=gif;  /* close the listing destination */  ods listing close;  /* open the html destination */  ods html path=odsout body='myfile.html';  /* SAS/GRAPH program code */  /* close the html destination */  ods html close;  /* open the listing destination */  ods listing; 

If both the listing destination and the HTML destination are open when you use the GIF device driver to generate graphics for the Web, the following output is generated:

HTML Destination

Listing Destination

The GIF driver creates aGIF file foreach graph. Each file s name corresponds to the name of the GRSEG entry for the same graph.

The GIF driver creates a GIF file named sasgraph.gif and writes or appends to it (depending on the GSFMODE= setting) each time it generates a graph.

All the HTML files specified on the ODS statement are created. Only the GIF files that are created in the HTML destination are referenced in the HTML files.

 

Output in the Listing destination is superfluous for Web use for the following reasons:

  • The file sasgraph.gif is not referenced in an HTML file.

  • Previewing GRSEG entries in the GRAPH window is not a reliable way to proofread the graphs for use with the Web because the GRAPH window and a Web browser render graphs differently.

Note: For more information on ODS destinations, see SAS Output Delivery System: User s Guide .




SAS.GRAPH 9.1 Reference, Volumes I and II
SAS.GRAPH 9.1 Reference, Volumes I and II
ISBN: N/A
EAN: N/A
Year: 2004
Pages: 342

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net