Chapter Contents |
Previous |
Next |
The Complete Guide to the SAS Output Delivery System |
If you open the Printer
destination, you can create output that is formatted for a high-resolution
printer. The first ODS PRINTER statement in the following SAS program opens
the Printer destination and directs the formatted output to the file odsprinter.ps
. The second ODS PRINTER statement closes the
Printer destination. You must close the Printer destination before you can
print the file.
The data set STATEPOP is created in a DATA step. The REGFMT format is created in a PROC FORMAT step. The Printer output appears in Output Created by the Printer Destination.
Note: This example uses file names that may not be valid
in all operating environments. To successfully run the example in your operating
environment, you may need to change the file specifications. See Alternative ODS HTML Statements for Running Examples in Different Operating Environments.
options nodate nonumber; ods printer file='odsprinter.ps'; proc tabulate data=statepop; class region state; var citypop_80 citypop_90; table region*state, citypop_80*sum=' ' citypop_90*sum=' '; format region regfmt.; where region=1; label citypop_80='1980' citypop_90='1990'; title 'Metropolitan Population for the Northeast Region'; title2 '(measured in millions)'; run; ods printer close;
Output Created by the Printer Destination
For more information about creating Printer output, see ODS PRINTER Statement.
Note: Procedure
options that affect presentation may not affect Printer output. For instance,
the DOUBLE option in PROC PRINT, which inserts a blank line between observations,
has no effect on Printer output.
Chapter Contents |
Previous |
Next |
Top of Page |
Copyright 1999 by SAS Institute Inc., Cary, NC, USA. All rights reserved.