02-10-2017 08:45 AM
In your code, before you run anything, you can put:
proc printto log="<path to log>\<name of log>_%sysfunc(date(),date9.)_%sysfunc(time(),tod5).txt";
This will redirect the log output to the given file, and the %sysfunc's will give a date and time in the filename.
02-10-2017 09:01 AM
By personal preference, I would use yymmddd10. or yymmddn8. as the format for the date value. This automatically sorts the logs in their chronological order.