| SAS Companion for the CMS Environment |
Using the PRINTTO procedure with its
LOG= and PRINT= options,
you can route the SAS log or SAS procedure output to an external file from
the windowing environment or from batch mode. You can specify the name of
the external file in the PROC PRINTTO statement. For example, the following
statement routes procedure output to OUTPUT LISTING B:
proc printto print='output listing b' new;
The NEW option tells SAS to overwrite OUTPUT LISTING
B if it already exists.
To specify print format or other characteristics for
an external file, or to specify the same external file several times in your
SAS program, use the FILENAME statement and the PRINTTO procedure. The following
example shows how to send the SAS log to an external file that has print format.
In the example, SASLOG is the name of the SAS log file, OUTLIST is the name
of the external file, and the A in the RECFM= option specifies print format.
filename outlist 'SASLOG file a' recfm=va;
proc printto print=outlist;
run;
To reroute the log and procedure output to their default destinations,
submit the following statements:
proc printto;
run;
See Default Routings of the SAS Log and Procedure Output Files
for a list of the default destinations.
Copyright © 1999 by SAS Institute Inc., Cary, NC, USA. All rights reserved.