Date: Wed, 20 Dec 2006 22:33:53 -0500
Reply-To: "Richard A. DeVenezia" <rdevenezia@WILDBLUE.NET>
Sender: "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From: "Richard A. DeVenezia" <rdevenezia@WILDBLUE.NET>
Subject: Re: current proc printto destination
> Is there a way to determine whether proc printto is currently in
> effect and to store the current proc printto destination in a macro
> variable? I'd like to reroute some output from within a macro to a
> temporary destination, then reroute it back to the original proc
> printto destination. Can this be done?
> John Hendrickx
PRINTO is not a queryable interface. You have to directly manage any
PRINTTO stacks or nestings. If you are running code within a context you
have no control over, there is no explicit way to know with certainty where
PRINTTO is directing the log and lst streams.
Remember, file output through a SAS fileref goes through a device driver and
can endup just about anywhere... disk, sas catalog, pipe input, ftp, url,
socket, ... After overriding, restoring printto streams may not always be
possible due to security or negotiation issues.
Under Windows, and with sufficient knowledge, you could use Windows
Management Instrumentation to query a WBEM component that tracks open file
Richard A. DeVenezia