Usage Note 24185: How do I send ODS PRINTER output directly to a printer?
It depends on your platform.
Sample code is included below for the various platforms.
Be sure to verify that the code works for your local operating environment,
because some details can differ.
In the following examples, the user's local printer is
known to the operating system as "BldgBPrinter." This is a printer name
that the operating system knows, not a printer name that SAS knows.
- MVS
- Define a SYSOUT= fileref and print to that:
filename local sysout=a dest=BldgBPrinter;
ods printer file=local;
Note: Some users have tried defining the SYSOUT= in JCL
rather than the FILENAME statement. Although this seems right,
and it works in v8.2, it does not work correctly in v8.0 or v8.1. Use the
FILENAME statement instead in v8.0 or v8.1.
- CMS
- Use code like this:
cms remote prt BldgBPrinter (devtype vafp;
filename local printer;
ods printer file=local;
- VMS
- Use a printer fileref, like so:
filename local printer passall=yes queue=BldgBPrinter;
ods printer file=local;
- UNIX
-
Just set up a pipe fileref to your print command.
(I believe that NLP here is a quirky local command; it's
probably called LPR on your system.)
filename local pipe "nlp -d BldgBPrinter";
ods printer file=local;
- Windows
- This is easy. If you merely want to print to
your default printer, all you need is
ods printer;
That's it!
If you want to print to a nondefault Windows printer,
it's nearly as simple.
Just use the printer name that you would normally use; for example,
if your departmental printer is called
"Don's printer" when you use a Windows program to print, just use that
name (without using the SAS or PS options):
ods printer printer="Don's printer";
To find out what printers are available, select
Start -> Settings -> Printers under Windows.
If a printer is listed there, you can use it on the ODS PRINTER
statement. If the printer name has spaces (and they usually do), then
you must put the name in quotation marks.
Operating System and Release Information
*
For software releases that are not yet generally available, the Fixed
Release is the software release in which the problem is planned to be
fixed.
Type: | Usage Note |
Priority: | low |
Topic: | SAS Reference ==> ODS (Output Delivery System) System Administration ==> Printing
|
Date Modified: | 2005-02-08 14:23:40 |
Date Created: | 2004-10-19 11:33:37 |