<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Overwrite _webout file for multiple outputs in Developers</title>
    <link>https://communities.sas.com/t5/Developers/Overwrite-webout-file-for-multiple-outputs/m-p/43515#M2823</link>
    <description>Hello,&lt;BR /&gt;
&lt;BR /&gt;
I have a stored process that I'd like to stream results back to the user.  I'd like to display a few messages to the user, something like:&lt;BR /&gt;
&lt;BR /&gt;
1) Your process has been submitted.&lt;BR /&gt;
2) Your query is processing.&lt;BR /&gt;
3) (display results)&lt;BR /&gt;
&lt;BR /&gt;
The problem that I'm having is that I can't seem to overwrite the previous _webout file.  SAS seems to simply append to the previous _webout file by default.  Is there any way to override this?</description>
    <pubDate>Mon, 04 Apr 2011 12:59:36 GMT</pubDate>
    <dc:creator>mdavidson</dc:creator>
    <dc:date>2011-04-04T12:59:36Z</dc:date>
    <item>
      <title>Overwrite _webout file for multiple outputs</title>
      <link>https://communities.sas.com/t5/Developers/Overwrite-webout-file-for-multiple-outputs/m-p/43515#M2823</link>
      <description>Hello,&lt;BR /&gt;
&lt;BR /&gt;
I have a stored process that I'd like to stream results back to the user.  I'd like to display a few messages to the user, something like:&lt;BR /&gt;
&lt;BR /&gt;
1) Your process has been submitted.&lt;BR /&gt;
2) Your query is processing.&lt;BR /&gt;
3) (display results)&lt;BR /&gt;
&lt;BR /&gt;
The problem that I'm having is that I can't seem to overwrite the previous _webout file.  SAS seems to simply append to the previous _webout file by default.  Is there any way to override this?</description>
      <pubDate>Mon, 04 Apr 2011 12:59:36 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Developers/Overwrite-webout-file-for-multiple-outputs/m-p/43515#M2823</guid>
      <dc:creator>mdavidson</dc:creator>
      <dc:date>2011-04-04T12:59:36Z</dc:date>
    </item>
    <item>
      <title>Re: Overwrite _webout file for multiple outputs</title>
      <link>https://communities.sas.com/t5/Developers/Overwrite-webout-file-for-multiple-outputs/m-p/43516#M2824</link>
      <description>Hi,&lt;BR /&gt;
&lt;BR /&gt;
Not strictly overwriting _webout but ...&lt;BR /&gt;
&lt;BR /&gt;
Take a look at Don Henderson's excellent blog article and example code here: &lt;A href="http://www.sascommunity.org/wiki/Generating_Descriptive_Please_Wait_Messages_for_Long_Running_Stored_Processes" target="_blank"&gt;http://www.sascommunity.org/wiki/Generating_Descriptive_Please_Wait_Messages_for_Long_Running_Stored_Processes&lt;/A&gt;&lt;BR /&gt;
&lt;BR /&gt;
The particular lines that 'switch off' the previous HTML output is here:&lt;BR /&gt;
&lt;BR /&gt;
 %if &amp;amp;pleaseWaitCounter ne %then /* close/hide prior please wait wait message */&lt;BR /&gt;
     %str(ods html text = "&lt;SCRIPT&gt;pleaseWait&amp;amp;pleaseWaitCounter..style.display = ""none""&lt;/SCRIPT&gt;";);&lt;BR /&gt;
&lt;BR /&gt;
I had some problems combining streaming HTML and then switching to Excel output but as long as you are displaying HTML throughout this should give you something to work with.  &lt;BR /&gt;
&lt;BR /&gt;
Hope this helps,&lt;BR /&gt;
&lt;BR /&gt;
Graham.</description>
      <pubDate>Tue, 05 Apr 2011 13:42:10 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Developers/Overwrite-webout-file-for-multiple-outputs/m-p/43516#M2824</guid>
      <dc:creator>webminer</dc:creator>
      <dc:date>2011-04-05T13:42:10Z</dc:date>
    </item>
    <item>
      <title>Re: Overwrite _webout file for multiple outputs</title>
      <link>https://communities.sas.com/t5/Developers/Overwrite-webout-file-for-multiple-outputs/m-p/43517#M2825</link>
      <description>Here is another example:&lt;BR /&gt;
&lt;BR /&gt;
&lt;B&gt;Usage Note 30889: Displaying the "Please Wait" message for a long-running stored process&lt;/B&gt;&lt;BR /&gt;
&lt;A href="http://support.sas.com/kb/30/889.html" target="_blank"&gt;http://support.sas.com/kb/30/889.html&lt;/A&gt;&lt;BR /&gt;
&lt;BR /&gt;
Vince DelGobbo&lt;BR /&gt;
SAS R&amp;amp;D</description>
      <pubDate>Wed, 06 Apr 2011 04:33:36 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Developers/Overwrite-webout-file-for-multiple-outputs/m-p/43517#M2825</guid>
      <dc:creator>Vince_SAS</dc:creator>
      <dc:date>2011-04-06T04:33:36Z</dc:date>
    </item>
    <item>
      <title>Re: Overwrite _webout file for multiple outputs</title>
      <link>https://communities.sas.com/t5/Developers/Overwrite-webout-file-for-multiple-outputs/m-p/43518#M2826</link>
      <description>Thanks Vince and Graham.&lt;BR /&gt;
&lt;BR /&gt;
I've got Don's example working -- only one small thing I'd like to change and I'm not sure exactly how to do it.  Is there any way to change the style of Don's message?  I don't believe I can change the default _ODSSTYLE value since the %STPBEGIN and %STPEND macro variables are turned off, as turning them on would cause a problem with the _WEBOUT file being in use.</description>
      <pubDate>Wed, 06 Apr 2011 21:09:06 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Developers/Overwrite-webout-file-for-multiple-outputs/m-p/43518#M2826</guid>
      <dc:creator>mdavidson</dc:creator>
      <dc:date>2011-04-06T21:09:06Z</dc:date>
    </item>
    <item>
      <title>Re: Overwrite _webout file for multiple outputs</title>
      <link>https://communities.sas.com/t5/Developers/Overwrite-webout-file-for-multiple-outputs/m-p/43519#M2827</link>
      <description>Hi,&lt;BR /&gt;
&lt;BR /&gt;
I got the style to change as follows:&lt;BR /&gt;
&lt;BR /&gt;
Turn OFF the automatic generation of Stored Process Macros: (on the SAS Code/"Include Code for" button while editing the Stored Process in EG.) &lt;BR /&gt;
&lt;BR /&gt;
Code the %stpbegin/end yourself:&lt;BR /&gt;
&lt;BR /&gt;
%global _odsstyle;&lt;BR /&gt;
&lt;BR /&gt;
%let _odsstyle = seaside;&lt;BR /&gt;
&lt;BR /&gt;
%stpbegin;&lt;BR /&gt;
&lt;BR /&gt;
%PleaseWaitExample;&lt;BR /&gt;
&lt;BR /&gt;
%stpend;&lt;BR /&gt;
&lt;BR /&gt;
It's a bit fiddly but it works.  Another option is to rewrite the PleaseWait code with data _null_ and put statements and use a homegrown .css file. &lt;BR /&gt;
&lt;BR /&gt;
Email me at graham.murray@webminer.co.uk if you want me to send you the code I have.&lt;BR /&gt;
&lt;BR /&gt;
HTH,&lt;BR /&gt;
Graham.</description>
      <pubDate>Fri, 08 Apr 2011 09:33:55 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Developers/Overwrite-webout-file-for-multiple-outputs/m-p/43519#M2827</guid>
      <dc:creator>webminer</dc:creator>
      <dc:date>2011-04-08T09:33:55Z</dc:date>
    </item>
    <item>
      <title>Overwrite _webout file for multiple outputs</title>
      <link>https://communities.sas.com/t5/Developers/Overwrite-webout-file-for-multiple-outputs/m-p/43520#M2828</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi guys,&lt;/P&gt;&lt;P&gt;I was facing&amp;nbsp; a similar problem as said by graham above.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have a summary proc report which is generated first and needs to be displayed to the User.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Then a CSV file containing additional data points needs to be generated where the user will be prompeted to save the file in his desktop.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The problem is that along with the proc report the contents of the CSV are also appearing in the same HTML and a separate prompt for downloading the CSV is not getting generated.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If any one has found a workaround for this then would request you help.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 22 Aug 2011 13:15:16 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Developers/Overwrite-webout-file-for-multiple-outputs/m-p/43520#M2828</guid>
      <dc:creator>NN</dc:creator>
      <dc:date>2011-08-22T13:15:16Z</dc:date>
    </item>
    <item>
      <title>Overwrite _webout file for multiple outputs</title>
      <link>https://communities.sas.com/t5/Developers/Overwrite-webout-file-for-multiple-outputs/m-p/43521#M2829</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi&lt;/P&gt;&lt;P&gt;If you haven't managed to fix this drop me a line offline (email above...).&amp;nbsp; I'm not working with the stored process server at my current client (yet) but could maybe point you in the right direction if I could see the code.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;IIRC, I did something similar to your scenario by separating into 2 stored procs ... First stored proc runs the proc report and then used Don's macro to display a 'Continue' button after the proc report html. (The html in the button runs the second stored process which streams the CSV file ...)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;HTH,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Graham.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 26 Aug 2011 10:24:45 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Developers/Overwrite-webout-file-for-multiple-outputs/m-p/43521#M2829</guid>
      <dc:creator>webminer</dc:creator>
      <dc:date>2011-08-26T10:24:45Z</dc:date>
    </item>
    <item>
      <title>Overwrite _webout file for multiple outputs</title>
      <link>https://communities.sas.com/t5/Developers/Overwrite-webout-file-for-multiple-outputs/m-p/43522#M2830</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I've written a blog post about this as well.&lt;/P&gt;&lt;P&gt;&lt;A href="http://blogs.sas.com/content/bi/2010/07/20/combining-graphsprocs-with-custom-html-in-a-sas-stored-process/"&gt;http://blogs.sas.com/content/bi/2010/07/20/combining-graphsprocs-with-custom-html-in-a-sas-stored-process/&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You can simply add the STYLE macro inside the ODS HTML statement as follows:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;ods html body=_webout (no_bottom_matter) &lt;STRONG&gt;style=sasweb&lt;/STRONG&gt; path=&amp;amp;_tmpcat&amp;nbsp; (url=&amp;amp;_replay);&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;~ Angela Hall&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 22 Sep 2011 00:04:56 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Developers/Overwrite-webout-file-for-multiple-outputs/m-p/43522#M2830</guid>
      <dc:creator>AngelaHall</dc:creator>
      <dc:date>2011-09-22T00:04:56Z</dc:date>
    </item>
    <item>
      <title>Overwrite _webout file for multiple outputs</title>
      <link>https://communities.sas.com/t5/Developers/Overwrite-webout-file-for-multiple-outputs/m-p/43523#M2831</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;Angela what you have given is helpful but i dont think it would work in my scenario.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Graham,&lt;/P&gt;&lt;P&gt;Your idea of executing the process again will work but i wish to refrain from doing that.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;A sample code that i was aiming at is as below. in my Stored process i have closed the auto generated stored process macros.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*HTML PART START;&lt;BR /&gt;ods html body=_webout;&lt;/P&gt;&lt;P&gt;proc print data=sashelp.class;&lt;BR /&gt;run;&lt;BR /&gt;ods html close;&lt;BR /&gt;*HTML PART END;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*CSV PART START;&lt;BR /&gt;data _null_;&lt;BR /&gt; &lt;BR /&gt;&amp;nbsp;&amp;nbsp; /* Set HTTP headers */&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; rc = stpsrv_header('Content-type','application/vnd.ms-excel');&lt;BR /&gt;&amp;nbsp; &lt;BR /&gt;&amp;nbsp;&amp;nbsp; /* Prompt to SAVE or OPEN the attachment file named test.xls using Excel */&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; rc = stpsrv_header('Content-disposition','attachment; filename=test.csv');&lt;BR /&gt;&amp;nbsp;&amp;nbsp; run;&lt;BR /&gt;&amp;nbsp; &lt;BR /&gt; &lt;BR /&gt;&amp;nbsp; data _null_; &lt;BR /&gt;&amp;nbsp; file _WEBOUT; &lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; do UNTIL (EOF);&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; set sashelp.class end=eof;&lt;BR /&gt;&amp;nbsp; put @01 name $12.&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; @17 sex $11. &lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ; &lt;BR /&gt;&amp;nbsp; END;&lt;BR /&gt;&amp;nbsp; run;&lt;/P&gt;&lt;P&gt;*CSV PART END;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 22 Sep 2011 06:17:45 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Developers/Overwrite-webout-file-for-multiple-outputs/m-p/43523#M2831</guid>
      <dc:creator>NN</dc:creator>
      <dc:date>2011-09-22T06:17:45Z</dc:date>
    </item>
  </channel>
</rss>

