Chapter Contents |
Previous |
Next |
The PRINTTO Procedure |
Tip: | To reset the destination for the SAS log and procedure output to the default, use the PROC PRINTTO statement without options. |
Tip: | To route the SAS log and procedure output to the same file, specify the same file with both the LOG= and PRINT= options. |
PROC PRINTTO <option(s)>; |
To do this | Use this option | |
---|---|---|
provide a description for a SAS log or procedure output stored in a SAS catalog entry | LABEL= | |
route the SAS log to a permanent external file or SAS catalog entry | LOG= | |
combine the SAS log and procedure output into a single file | LOG= and PRINT= with same destination | |
replace the file instead of appending to it | NEW= | |
route procedure output to a permanent external file or SAS catalog entry | PRINT= |
Without Options |
Using a PROC PRINTTO statement with no options
Interaction: | To close the appropriate file and to return only the SAS log or procedure output to its default destination, use LOG=LOG or PRINT=PRINT. |
Featured in: | Routing to External Files and Routing to SAS Catalog Entries |
Options |
Range: | 1 to 40 characters |
Interaction: | Use the LABEL= option only when you specify a catalog entry as the value for the LOG= or the PRINT= option. |
Featured in: | Routing to SAS Catalog Entries |
Default: | LOG. |
Tip: | After routing the log to an external file or a catalog entry, you can specify LOG to route the SAS log back to its default destination. |
Tip: | When routing the SAS log, include a RUN statement in the PROC PRINTTO statement. If you omit the RUN statement, the first line of the following DATA or PROC step is not routed to the new file. (This occurs because a statement does not execute until a step boundary is crossed.) |
Interaction: | The NEW option replaces the existing contents of a file with the new log. Otherwise, the new log is appended to the file. |
Interaction: | To route the SAS log and procedure output to the same file, specify the same file with both the LOG= and PRINT= options. |
Interaction: | When routing the log to a SAS catalog entry, you can use the LABEL option to provide a description for the entry in the catalog directory. |
Featured in: | Routing to External Files , Routing to SAS Catalog Entries , and Using Procedure Output as an Input File |
Default: | If you omit NEW, the new information is appended to the existing file. |
Interaction: | If you specify both LOG= and PRINT=, NEW applies to both. |
Featured in: | Routing to External Files , Routing to SAS Catalog Entries , and Using Procedure Output as an Input File |
Aliases: | FILE=, NAME= |
Default: | |
Interaction: | The NEW option replaces the existing contents of a file with the new procedure output. If you omit NEW, the new output is appended to the file. |
Interaction: | To route the SAS log and procedure output to the same file, specify the same file with both the LOG= and PRINT= options. |
Interaction: | When routing procedure output to a SAS catalog entry, you can use the LABEL option to provide a description for the entry in the catalog directory. |
Featured in: | Using Procedure Output as an Input File |
Range: | 1 to 99, integer only. |
Tip: | You can define this fileref yourself; however, some operating systems predefine certain filerefs in this form. |
Chapter Contents |
Previous |
Next |
Top of Page |
Copyright 1999 by SAS Institute Inc., Cary, NC, USA. All rights reserved.