LISTSERV at the University of Georgia
Menubar Imagemap
Home Browse Manage Request Manuals Register
Previous messageNext messagePrevious in topicNext in topicPrevious by same authorNext by same authorPrevious page (April 2009, week 1)Back to main SAS-L pageJoin or leave SAS-L (or change settings)ReplyPost a new messageSearchProportional fontNon-proportional font
Date:   Tue, 7 Apr 2009 14:09:12 -0400
Reply-To:   Paul Walker <walker.627@OSU.EDU>
Sender:   "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From:   Paul Walker <walker.627@OSU.EDU>
Subject:   Get proc printto location

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;

=========================


Back to: Top of message | Previous page | Main SAS-L page