|
Hi,
I wondered if there is a way to retrieve the currently active proc printto
location. Here's what I am thinking for a simple illustration:
========================
proc printto log="C:\MyFolder\MyProgram.Log" new;
run;
%let CurrentPrinttoLog = %GetPrintto;
%put NOTE: Proc printto is writing to &CurrentPrinttoLog;
proc printto;
run;
=========================
What I would really like to be able to do is get the current location so
that I can later change it back. For example:
=========================
* Write to a log;
proc printto log="C:\MyFolder\MyProgram.Log" new;
run;
%* Get name of the log file;
%let CurrentPrinttoLog = %GetPrintto;
%* Write to a new log file;
proc printto log="C:\MyFolder\Different.Log" new;
run;
%* Submit whatever code needed;
put "Hello";
%* Reset printto location;
proc printto;
run;
%* Resume writing to the first log;
proc printto log="&CurrentPrinttoLog";
run;
=========================
|