/***************************************************************************************************************** SAS file name: logtotxt File location: _________________________________________________________________________________________________________________ Purpose: To demonstrate how to output the SAS log to an external text file with PROC PRINTTO Author: Peter Clemmensen Creation Date: 01/01/2019 This program supports the example page "Output Log to Text file in SAS with PROC PRINTTO" on SASnrd.com *****************************************************************************************************************/ /* Redirect log to txt file */ proc printto log="c:\Users\Peter\Desktop\MyLog.txt"; run; /* Run some SAS code */ data MyData; do i=1 to 100; output; end; run; /* Redirect the log back to the SAS editor */ proc printto; run;