/***************************************************************************************************************** SAS file name: LOGPARSE_Macro.sas File location: _________________________________________________________________________________________________________________ Purpose: To demonstrate how to use the LOGPARSE Macro to track performance of your SAS programs Author: Peter Clemmensen Creation Date: 12/12/2017 This program supports the post "Using the LOGPARSE Macro to Track Performance" on SASnrd.com *****************************************************************************************************************/ /* 1) Set the fullstimer option to write sufficient performance information to the log */ options fullstimer; /* 2) Save log in a file */ options nonotes nosource; proc printto log="c:\Users\Peter\Desktop\MyProgram.log"; run; options notes source; /* 3) Call the PASSINFO macro */ %passinfo; /* 4) Run some SAS program steps */ data class; set sashelp.class; run; proc sort data=class; run; proc reg data=class; model weight=height; by sex; run;quit; /* 5) Reset log options */ proc printto; run; /* 6) Call LOGPARSE Macro and save performance statistics in work.PerfStat data set */ %logparse(c:\Users\Peter\Desktop\MyProgram.log,work.PerfStat,,,append=NO);