Hi, This could be a crazy idea, but I'm was wondering if I could hijack _webout to send results to a file instead of the browser, when using %stpbegin/%stpend. So far, seems like the answer is no. Asked another way, suppose I want to write results to a file on the server (pdf/html/rtf), rather than stream them to a browser, when a user runs a stored process (through SPWA). I see 3 possibilities: 1. Wanting to use %stpbegin/%stpend in the stored process, was thinking I would try just redirecting the _webout fileref to point to a file. But clearly _webout is more than your typical fileref. So filename _webout "~/somewhere/myfile.htm" fails. Is there a way to hijack _webout? 2. Assuming I can't redirect _webout, another option would be to redefine %stpbegin(), adding a parameter for body= which would default to _webout, but allow the developer to specify an altenative. So %stpbegin(body="~/somewhere/myfile.htm") or something like that. But then there is part of me that hates the idea of putting a revised definition of %stpbegin() in my personal/project autocall library to replace the SI provided macro. Because anyone who sees %stpbegin() will assume it's calling the usual %stpbegin, and of course SAS will likely keep expanding the functionality of %stpbegin() over time. 3. Which makes me think I'll just write my own, limited, alternative to %stbegin(). A simple macro that would generate an ODS &_odsdest statement, sending results to a user-specified file, with user-specified options. Benefit of this approach is that I have control (and understanding) of what it does. But down side is I would potentially miss out on some of the magical possibilities of %stpbegin(). Currently I've been playing with #3, but was wondering if #1 is possible, or if people would share my concerns about #2. Thanks, --Q.
... View more