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 (December 2006, week 3)Back to main SAS-L pageJoin or leave SAS-L (or change settings)ReplyPost a new messageSearchProportional fontNon-proportional font
Date:         Wed, 20 Dec 2006 03:02:09 -0800
Reply-To:     "ckxplus@yahoo.com" <ckxplus@YAHOO.COM>
Sender:       "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From:         "ckxplus@yahoo.com" <ckxplus@YAHOO.COM>
Organization: http://groups.google.com
Subject:      Re: current proc printto destination
Comments: To: sas-l@uga.edu
In-Reply-To:  <200612191724.kBJFxivV001403@mailgw.cc.uga.edu>
Content-Type: text/plain; charset="us-ascii"

Thanks, this is more or less the solution I had in mind. But I'm worried about its robustness too. It works fine if proc printto is in effect, then it correctly produces the last external file referenced. But if proc printto is the default destination, then it produces some other file or directory, the last file opened in SAS for example. A workaround would be to add the constraint that the proc printto destination must have a specific extension, e.g. ".out". Something like:

proc sql noprint;

select xpath into :_printtopath from dictionary.extfiles where upcase(xpath) like '%.OUT' and substr(fileref,1,3)="#LN" having substr(fileref,4)=max(substr(fileref,4)); quit;

&_printtopath will be empty if the printto destination is not a *.out file. Best solution I suppose but it shouldn't be this hard to find out what the output destination(s) are and whether they're just text or also ODS.

Thanks for the help, John Hendrickx

Ya Huang schreef:

> The last fileref in sashelp.vextfl seems the one you want. Don't know > if this is robust enough though. > > > proc printto print="c:\temp\xx.txt"; > > proc print data=sashelp.class; > run; > > proc sql noprint; > select xpath into : printtopath > from > sashelp.vextfl > having input(compress(fileref,'#LN'),best.)=max(input(compress > (fileref,'#LN'),best.)) > ; > > %put &printtopath; > > 59 %put &printtopath; > c:\temp\xx.txt > > > > > > On Tue, 19 Dec 2006 08:02:23 -0800, ckxplus@yahoo.com <ckxplus@YAHOO.COM> > wrote: > > >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


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