I'd like to send my SAS log via email. I found a lot of documentation to do it by saving the log on the disk. I can't use this kind of approach because of file system restrictions. Would it be possible to redirect my log to a macro variable and put it in the email?
1 Answer
No I don't think you can redirect the log to a macro variable. But you always have write access to the work directory, so you can write it there, like:
proc printto log="%sysfunc(pathname(work))/mylog.log" new ;
run;
3 Comments
cinghio
Thanks, sad news!
Allan Bowe
@cinghio - you should accept this answer. For more details you can also review: stackoverflow.com/questions/40115153/…
cinghio
Everything is fine now. I managed to write the file, I don't need "in-memory" log anymore. Anyway thanks for your help, now I know a new thing about SAS log.
filename tmp temp;filename email?