Chapter Contents |
Previous |
Next |
PRINTTO |
Windows specifics: | Valid values for file-specification; UNIT= option |
Syntax | |
Details | |
Examples | |
Example 1: Redirecting SAS Log Output | |
Example 2: Redirecting SAS Procedure Output | |
Example 3: Restoring the Output Destinations to the Default | |
See Also |
Syntax |
PROC PRINTTO <option(s)> |
Note: This is a simplified version of
the PRINTTO procedure syntax. For the complete syntax and its explanation,
see the PRINTTO procedure in SAS Procedures Guide.
Details |
The PRINTTO procedure defines destinations for SAS procedure output and for the SAS log.
Examples |
The following statements redirect any SAS log entries that are generated after the RUN statement to an output file with a fileref of TEST, which is associated with the LPT1: device:
filename test printer 'lpt1:'; proc printto log=test; run;
When these statements are issued, a dialog box is opened that informs you PROC PRINTTO is running. All SAS log entries are redirected to the TEST output file as specified; however, they are not printed on the LPT1: device until the output file is closed, either by redirecting the SAS log entries back to the default destination or to another file.
The following statements send any SAS log entries that are generated after the RUN statement to the external file associated with the fileref MYFILE:
filename myfile 'c:\mydir\mylog.log'; proc printto log=myfile; run;
The following statements send any SAS procedure output to a file named MYPRINT.LST in your working directory (assuming MYPRINT is not a previously defined fileref or environment variable):
proc printto print=myprint; run;
The following statements send any SAS procedure output to the printer port, which is usually defined by the system as LPT1:
proc printto print='lpt1:'; run;
proc printto; run;
See Also |
Chapter Contents |
Previous |
Next |
Top of Page |
Copyright 1999 by SAS Institute Inc., Cary, NC, USA. All rights reserved.