SAS Author's Tip: Saving Graphs without ODS

2


Dear readers, I’m trying out something new that I hope you’ll like. Once a week, for the next couple of months, I’ll post a short excerpt or tip from one of our books. To make things fun, I’m going to randomly select the book by walking into the SAS Press library, closing my eyes, spinning around twice, and then pulling one lucky book off the shelf.

The following excerpt is from SAS Press author Phil Mason’s In the Know: SAS Tips and Techniques from Around the Globe, Second Edition. Copyright © 2006, SAS Institute Inc., Cary, North Carolina, USA. ALL RIGHTS RESERVED.

Saving graphs without ODS

You can produce graphs and save them to an external file such as a JPEG or GIF. To do so you must do the following:

  • Define a fileref to point to the file. For a file on the network, use a filename. For a file on a Web site, use a URL or FTP engine.
  • Use GOPTIONS GSFNAME=fileref.
  • Use GOPTIONS DEVICE=dev-type ;
  • Produce the graph.

You can read a free chapter from Phil’s book as well as book reviews. If you have used Phil’s book, yourself, we’d love to hear from you!

Share

About Author

Shelly Goodin

Social Media Specialist, SAS Publications

Shelly Goodin is SAS Publications' social media marketer and the editor of "SAS Publishing News". She’s worked in the publishing industry for over thirteen years, including seven years at SAS, and enjoys creating opportunities for fans of SAS and JMP software to get to know SAS Publications' many offerings and authors.

Related Posts

2 Comments

  1. Shelly Goodin on

    Hi Frank, thank so much for reading the post and for your feedback! Since I'm not a techie (sadly), I shared your note with SAS Technical Support. From their response, it sounds like the code should work in 9.2. If you'd like, I can put them in touch with you. Thanks again for sharing your experience trying this with us.--Shelly

  2. Frank Poppe on

    This worked in 9.1.3.
    It doesn't always work in 9.2.
    You now have to open the ODS LISTING destination (which often is closed by default at the start of a session).

Back to Top