Usage Note 22378: How to make a copy of the SAS® Log and SAS Listing files or change the default destination of your Log and Listing output
The LOG and PRINT SAS system options, when specifed at invocation, enable you to redirect your SAS Log and SAS Output files when running SAS in batch mode. Additionally, the ALTLOG and ALTPRINT SAS system options allow you to route COPIES of these files to another file.
You can also use PROC PRINTTO to route the log and/or output to a file. The example below shows how to route both the log and output to text files for review later.
You can remove either PRINT= or LOG=, depending on the results you are trying to achieve.
The NEW option specifies that only new information is put into the file. If the file exists, all other information is removed and only new log or procedure output is placed into it. If you remove the NEW option, an existing file will have log or output information appended to what is already in the file. The second PROC PRINTTO is used to close the external file and restore the default behavior to your SAS session. This syntax can be used with or without the above ALT/LOG and ALT/PRINT options in effect.
filename mylog 'mylog.txt';
filename myout 'myout.txt';
proc printto print=myout log=mylog new;
run;
proc print data=sashelp.class;
run;
proc printto;
run;
Operating System and Release Information
SAS System | Base SAS | z/OS | | |
OpenVMS VAX | | |
Microsoft® Windows® for 64-Bit Itanium-based Systems | | |
Microsoft Windows Server 2003 Datacenter 64-bit Edition | | |
Microsoft Windows Server 2003 Enterprise 64-bit Edition | | |
Microsoft Windows XP 64-bit Edition | | |
Microsoft® Windows® for x64 | | |
OS/2 | | |
Microsoft Windows 95/98 | | |
Microsoft Windows 2000 Advanced Server | | |
Microsoft Windows 2000 Datacenter Server | | |
Microsoft Windows 2000 Server | | |
Microsoft Windows 2000 Professional | | |
Microsoft Windows NT Workstation | | |
Microsoft Windows Server 2003 Datacenter Edition | | |
Microsoft Windows Server 2003 Enterprise Edition | | |
Microsoft Windows Server 2003 Standard Edition | | |
Microsoft Windows XP Professional | | |
Windows Millennium Edition (Me) | | |
Windows Vista | | |
64-bit Enabled AIX | | |
64-bit Enabled HP-UX | | |
64-bit Enabled Solaris | | |
ABI+ for Intel Architecture | | |
AIX | | |
HP-UX | | |
HP-UX IPF | | |
IRIX | | |
Linux | | |
Linux for x64 | | |
Linux on Itanium | | |
OpenVMS Alpha | | |
OpenVMS on HP Integrity | | |
Solaris | | |
Solaris for x64 | | |
Tru64 UNIX | | |
*
For software releases that are not yet generally available, the Fixed
Release is the software release in which the problem is planned to be
fixed.
The -LOG and -PRINT options enable the log or output files to be redirected, while the -ALTLOG and -ALTPRINT options create a COPY of the log and output file, respectively.
Type: | Usage Note |
Priority: | low |
Date Modified: | 2008-03-17 09:27:24 |
Date Created: | 2002-12-16 10:56:48 |