Chapter Contents

Previous

Next
PRINTTO

PRINTTO



Defines destinations for SAS procedure output and the SAS log

UNIX specifics: destination


Details
Examples
See Also


Details

LOG=destination
Destination is a fully qualified pathname (in quotes), an environment variable, a fileref, or a file in the current directory (without extension).

PRINT=destination
Destination is a fully qualified pathname (in quotes), an environment variable, a fileref, or a file in the current directory (without extension). If you specify a fileref that is defined with the PRINTER device-type keyword, output is sent directly to the printer.


Examples

The following statements send any SAS log entries that are generated after the RUN statement to the external file that is associated with the fileref MYFILE:

filename myfile '/users/myid/mydir/mylog';
proc printto log=myfile;
run;
If MYFILE has not been defined as a fileref, PROC PRINTTO will create the file myfile.log in the current directory.

The following statements send any procedure output that is generated after the RUN statement to file /users/myid/mydir/myout:

proc printto print='/users/myid/mydir/myout';
run;

The following statements send the procedure output from the CONTENTS procedure directly to the system printer:

filename myfile printer;
proc printto print=myfile;
run;

proc contents data=oranges;
run;
To redirect the SAS log and procedure output to their original default destinations, run PROC PRINTTO without any options:
proc printto;
run;

If MYPRINT and MYLOG have not been defined as filerefs, then the following statements send any SAS procedure output to myprint.lst and any log output to mylog.log in the current directory:

proc printto print=myprint log=mylog;
run;
If filerefs MYPRINT and MYLOG had been defined, the output would have gone to the files associated with these filerefs.

See Also


Chapter Contents

Previous

Next

Top of Page

Copyright 1999 by SAS Institute Inc., Cary, NC, USA. All rights reserved.