/***************************************************************************************************************** SAS file name: log_window_external.sas File location: __________________________________________________________________________________________________________________ Purpose: To demonstrate how to export the log while still having it in the usual log window. Author: Peter Clemmensen Creation Date: 04/11/2019 This program supports the blog post "Write SAS log to txt file and log window" on SASnrd.com *****************************************************************************************************************/ %let logpath=YourPathHere; proc printto log="&logpath.\log.log"; run; data class; set sashelp.class; run; proc sort data=class; by height; run; proc print data=class; run; proc printto log=log; run; data _null_; infile "&logpath.\log.log"; input; putlog "->" _infile_; run;