This example uses PROC PRINTTO to route the log and procedure
output to an external file and then reset both destinations to the default.
| options nodate pageno=1 linesize=80 pagesize=60 source; |
| proc printto log='log-file';
run;
|
| data numbers;
input x y z;
datalines;
14.2 25.2 96.8
10.8 51.6 96.8
9.5 34.2 138.2
8.8 27.6 83.2
11.5 49.4 287.0
6.3 42.0 170.7
; |
| proc printto print='output-file' new;
run; |
proc print data=numbers;
title 'Listing of NUMBERS Data Set';
run;
| proc printto;
run;
|
Portion of Log Routed to the Default Destination
1 options nodate pageno=1 linesize=80 pagesize=60 source;
2 proc printto log='log-file';
3 run; |
Portion of Log Routed to an External File
5
6 data numbers;
7 input x y z;
8 datalines;
NOTE: The data set WORK.NUMBERS has 6 observations and 3 variables.
NOTE: DATA statement used:
real time 0.00 seconds
cpu time 0.00 seconds
15 ;
16 proc printto print='output-file' new;
16
17 run;
NOTE: PROCEDURE PRINTTO used:
real time 0.00 seconds
cpu time 0.00 seconds
18
19 proc print data=numbers;
20 title 'Listing of NUMBERS Data Set';
21 run;
NOTE: The PROCEDURE PRINT printed page 1.
NOTE: PROCEDURE PRINT used:
real time 0.00 seconds
cpu time 0.00 seconds
22
23 proc printto;
24 run; |
Procedure Output Routed to an External File
Listing of NUMBERS Data Set 1
OBS x y z
1 14.2 25.2 96.8
2 10.8 51.6 96.8
3 9.5 34.2 138.2
4 8.8 27.6 83.2
5 11.5 49.4 287.0
6 6.3 42.0 170.7 |
Copyright 1999 by SAS Institute Inc., Cary, NC, USA. All rights reserved.