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 (February 2006, week 4)Back to main SAS-L pageJoin or leave SAS-L (or change settings)ReplyPost a new messageSearchProportional fontNon-proportional font
Date:   Wed, 22 Feb 2006 14:21:05 -0800
Reply-To:   "Choate, Paul@DDS" <pchoate@DDS.CA.GOV>
Sender:   "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From:   "Choate, Paul@DDS" <pchoate@DDS.CA.GOV>
Subject:   Re: Current PROC PRINTTO log file??
Comments:   To: Lorne Klassen <lk1@ROGERS.COM>
Content-Type:   text/plain; charset="us-ascii"

Lorne -

Don't know of a way to determine where log or output are routed after the fact. Interestingly, although you can use "log" as a fileref and write things into your printto log file, the pathname function does not return its path.

You could set a couple global macro variables to keep track of your current and last printto locations. Whenever you use a printto command you'd reset the two variables. This could be wrapped in a macro that executes your printto, so all you'd need to do is run the macro instead and specify the changed file location or return to the previous.

hth

Paul Choate DDS Data Extraction (916) 654-2160

> -----Original Message----- > From: SAS(r) Discussion [mailto:SAS-L@LISTSERV.UGA.EDU] On Behalf Of Lorne > Klassen > Sent: Wednesday, February 22, 2006 1:27 PM > To: SAS-L@LISTSERV.UGA.EDU > Subject: Current PROC PRINTTO log file?? > > I'm using PROC PRINTTO to redirect the log to a file before running three > DATA steps. Then I redirect the log back to the log window and parse the > log file to check for errors (don't ask...it has to be done this way). > This > works, but the problem is related to re-directing the log back to the log > window (using LOG=LOG). > > The problem is that before this section of code was submitted, the log may > have already been directed to a particular log file, not the window. In > this case, I do not want to simply redirect the log back to the log window > at the end. I really want to direct the log back to the file it was > originally being written to. But I want to write the code generically such > that I don't have to keep track of the last log file. In some cases, I may > have been originally writing to the log window, not to a file at all. > > So what I need is some way to get the file that the log is currently being > directed to, or, "LOG" if it is currently going to the log window. I > couldn't find an option that stores this value. I'm using 9.1. > > Thanks


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