-- -- CSCAR  
-- --   center for statistical consultation and research  
School of Social Work
--
about us
about us
location
workshops
software help
external resources
spatial
jobs
contact
search
--
The Center For Statistical Consultation and Research
3550 Rackham Building
University of Michigan
Ann Arbor, MI 48109-1070
cscar@umich.edu
.
Software Help
 
SAS Topics: Generic Printer Configurations for SAS/GRAPH

This document assumes a working knowledge of SAS. If you need additional assistance, please email UofM SAS Technical Support (sas.help@umich.edu) or telephone the CSCAR statistical consultant at 764-7828 (4-STAT).

There are two ways to use the code snippets given below.

  1. Include the setup code snippet in the 'autoexec' file (autoexec.sas for Windows, autoexec.sas610 or autoexec.sas611 for Macintosh and Unix) and restart SAS. This is really the most efficient way, as you only have to do it once -- the setup code is then enabled automagically each time you run SAS. However, this is possible only if you have permission to change the 'autoexec' file.
  2. Submit the setup code snippet ONCE via the program editor before you begin to submit the graphics code. The drawback to this method is that you will have to do this each time you run SAS and want to print graphics. However, if you do not have permission to change the 'autoexec' file, this is the easiest way to enable the setup.

NOTE: If you use SAS on an ITD Sites PC, this setup has already been done for you.


Windows
  • Monochrome Printer
    
    goptions device=win targetdevice=winprtm;
    
  • Grayscale Printer
    
     goptions device=win targetdevice=winprtg;
     
  • Color Printer
    
    goptions device=win targetdevice=winprtc;
    
Macintosh
  • Color/Grayscale Monitor and a Monochrome Printer
    
    goptions device=maccolor targetdevice=macprtm;
    
  • Color/Grayscale Monitor and a Grayscale Printer
    
    goptions device=maccolor targetdevice=macprtg;
    
  • Color/Grayscale Monitor and a Color Printer
    
    goptions device=maccolor targetdevice=macprtc;
    
  • Monochrome Monitor and a Monochrome Printer
    
    goptions device=macbw targetdevice=macprtm;
    
  • Monochrome Monitor and a Grayscale Printer
    
    goptions device=macbw targetdevice=macprtg;
    
  • Monochrome Monitor and a Color Printer
    
    goptions device=macbw targetdevice=macprtc;
    
Unix -- Interactive Mode (assumes a postscript-capable monochrome printer)

NOTE: You may have to replace the 'lp' portion of the filename statement with whatever command you normally use to print (probably something like lpr -Pprintername).

  • Color monitor and landscape printing (thin default lines)
    
    filename grafout pipe 'lp';
    goptions device=xcolor targetdevice=psll gsfname=grafout
    gsfmode=replace gsflen=132;
    
  • Color monitor and portrait printing (thick default lines)
    
    filename grafout pipe 'lp';
    goptions device=xcolor targetdevice=ps gsfname=grafout
    gsfmode=replace gsflen=132;
    
  • Monochrome monitor and portrait printing (thick default lines)
    
    filename grafout pipe 'lp';
    goptions device=xbw targetdevice=ps gsfname=grafout
    gsfmode=replace gsflen=132;
    
  • Monochrome monitor and portrait printing (thick default lines)
    
    filename grafout pipe 'lp';
    goptions device=xbw targetdevice=ps gsfname=grafout
    gsfmode=replace gsflen=132;
    
Unix -- Batch Mode (assumes a postscript-capable monochrome printer)

NOTE: This code will create a file in your home directory named 'graph.ps' that you can print, using whatever command on your system is appropriate for postscript files.

  • Landscape printing (thin default lines)
    
    filename grafout '~/graph.ps';
    goptions device=psll gsfname=grafout gsfmode=replace gsflen=132;
    
  • Portrait printing (thick default lines)
    
    filename grafout '~/graph.ps';
    goptions device=ps gsfname=grafout
    gsfmode=replace gsflen=132;
    
 
CSCAR Home | About Us | Location | Workshops & Seminars | Software Help | External Resources | Spatial Analysis GIS | Contact Us | Search
 
--
 
Copyright © 1998 - 2001 The Regents of the University of Michigan, Ann Arbor