Data visualization with SAS programming

ODS HTML: Just the file, please.

New Contributor
Posts: 2

ODS HTML: Just the file, please.

I tried creating some graphs with data tips, based on this example:

Example 1: Adding Custom Data Tips to a Graph in a Web Presentation

SAS/GRAPH(R) 9.3: Reference, Third Edition

I run my program in batch on Windows, SAS 9.3.

Works great - BUT:

  1. It makes me view all the graphs on screen while the program is running. How do I stop it doing that? I just want the files.
  2. It puts all the files in the current directory. I don't want my directory cluttered up with lots of graphics files; how can I get it to create a subdirectory and put them all in there?

I'm sure these things are really simple, but darned if I can figure it out. Can some kind person help?

Grand Advisor
Posts: 9,748

Re: ODS HTML: Just the file, please.

I don't have 9.3 but 9.2 has an option reached by using Tools>Option>Preferences>Results , uncheck box "View results as generated"

Remember to turn it back on afterwards!

ODS HTML path sets where your output files are going but if you want the graphics in a folder other than that with the HTML then you'll need to work with other options to ensure the references in the HTML point to that folder.

Posts: 65

Re: ODS HTML: Just the file, please.

For question #2, you want the "gpath=" option on the ODS HTML statement. From the SAS 9.3 ODS User's Guide:

"specifies the location for all graphics output that is generated while the destination is open. Use this option when you want to write graphics output files to a location different that specified by the PATH= option for markup files."


New Contributor
Posts: 2

Re: ODS HTML: Just the file, please.

Thanks, the GPATH= option on the ODS HTML statement lets me put all the graphics files away in a separate subdirectory.

For the other problem - having to respond while it displays all the graphs on screen, even though running in 'noninteractive' or 'batch' mode:


helps, insofar as the graphs just flash by on screen without requiring any user interaction.

I found that if I also specify:


then I don't even see anything on screen at all, which is great, although then I get a duplicate set of graphics files in (by default) a 'sasgraph' subdirectory (I think that can be changed using the GSFNAME= option).

If I could have

  • no forced user interaction for graphs displayed on screen
  • no graphs flashing by on screen
  • no duplicate output files

that would be perfect. But what I have now is good enough for my purposes.

Post a Question
Discussion Stats
  • 3 replies
  • 3 in conversation