SAS at MIT

Topic: Printing Graphics to a Printer
Category: FAQ
Last modified: Fri Dec 4 10:55:33 1998
Problems or Questions?


Using SAS/ASSIST

If you are using SAS/ASSIST, generate your output and then select the File menu option Print.. When it prompts you for the target device, enter PS, This will send the output to the printer you specified in your PRINTER environment variable, or to the default printer for the cluster. If you did not specify a PRINTER environment variable before you started SAS, and you want to send the printout to a different printer, do the following. Go to the PROGRAM EDITOR window, select the menu option Locals -> Recall to get the source code into the editor window and follow the instructions regarding writing a program..

Writing a Program

If you are writing a SAS program, you need to specify a file reference and a couple of graphics options. First add a line resembling the following:

filename grafout pipe 'lpr -Pprinter';

where printer is the printer to which you want to send your output. For example, to send output to the printer virus, you would type

filename grafout pipe 'lpr -Pvirus';

Next, modify your goptions statement to look like this:

goptions device=ps gsfname=grafout gsfmode=replace gaccess=sasgastd;

Rerun your program, and the output will be sent to the printer you specified in the filename statement.


[ SAS Home Page | Software Home Page | MIT Home Page ]