<?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 Re: Web application ERRORS concerning Result capabilities in Developers</title>
    <link>https://communities.sas.com/t5/Developers/Web-application-ERRORS-concerning-Result-capabilities/m-p/336127#M5250</link>
    <description>&lt;P&gt;A STP for a web application needs to create at least some stream output, as the STP web interface expects this. If no stream is sent, you get your first error message.&lt;/P&gt;
&lt;P&gt;Your STP should send some stream output like "The operation was successful".&lt;/P&gt;
&lt;P&gt;If you only want package output, you have to use the %stp_begin and %stp_end macros, as they set up the expected package output.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;My preferred method for publishing would be&lt;/P&gt;
&lt;P&gt;- don't use %stp_begin and %stp_end&lt;/P&gt;
&lt;P&gt;- don't create a package; de-select package output&lt;/P&gt;
&lt;P&gt;- create tables and/or HTML output on the server; HTML in a subdirectory where the web server has access (DocumentRoot and subdirs). "HTML" here also means downloadable content (text, csv, etc)&lt;/P&gt;
&lt;P&gt;- send email from SAS (filename mail) to the recipients with a message that content has been created; include links to that content.&lt;/P&gt;
&lt;P&gt;- satisfy streaming output by writing a success (or non-success) message to _webout (use HTML code).&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Keeping results out of the email prevents problems caused by emails grwoing larger than mail servers tolerate.&lt;/P&gt;</description>
    <pubDate>Mon, 27 Feb 2017 09:32:49 GMT</pubDate>
    <dc:creator>Kurt_Bremser</dc:creator>
    <dc:date>2017-02-27T09:32:49Z</dc:date>
    <item>
      <title>Web application ERRORS concerning Result capabilities</title>
      <link>https://communities.sas.com/t5/Developers/Web-application-ERRORS-concerning-Result-capabilities/m-p/336119#M5249</link>
      <description>&lt;P&gt;Dear Community,&lt;/P&gt;&lt;P&gt;These days i've been validating a macro which we use in the&amp;nbsp;SAS-Web-application&amp;nbsp;to publish a result-package (&lt;EM&gt;result.zip&lt;/EM&gt;) to the clients e-mail adress, with a STP. In a nutshell it retrieves the e-mail adress of the client, takes everything out of a special result folder, &lt;EM&gt;zip's&lt;/EM&gt; it and publishes the package with a few notes in the e-mail to the client.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I wrote the following&amp;nbsp;minimalistic STP code to validate the macro (represented by &lt;EM&gt;Test2&lt;/EM&gt;).&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;FILENAME mylog "E:\SAS_DATA\0_storedprocesses\dev\MacroVal\v3\2_log\stp_output_to_client_test_v3.log";
PROC PRINTTO LOG = mylog NEW;
RUN;

%INCLUDE "E:\SAS_DATA\2_macros\dev\v3\1_pgm\stp_output_to_client_v3.sas";
%INCLUDE "E:\SAS_DATA\2_macros\dev\v3\1_pgm\stp_output_to_client.sas";

%LET task_root = E:\SAS_DATA\0_storedprocesses\dev\MacroVal\v3\;
%LET res_path = E:\SAS_DATA\0_storedprocesses\dev\MacroVal\v3\6_output\;

%LET MailAddress = Clients_email_address@xy.com;
%LET stp_run = 0;
%LET refresh = 0;
%LET web_application = 1;
%LET logstatus = PASS;

/*Test2*/
/*%stp_output_to_client([...]Parameters used); */

PROC PRINTTO;
RUN;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;Defaultly i activated the result capabilities &lt;EM&gt;Stream&lt;/EM&gt; and &lt;EM&gt;Package&lt;/EM&gt; (because we do both in normal STP's).&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;IMG title="stp_result_capabilities_2.png" alt="stp_result_capabilities_2.png" src="https://communities.sas.com/t5/image/serverpage/image-id/7470iF927384F148B2315/image-size/original?v=1.0&amp;amp;px=-1" border="0" /&gt;&lt;/P&gt;&lt;P&gt;When executing the STP in our Web-application i got following error message:&lt;/P&gt;&lt;P&gt;Stored Process Error The SAS program did not produce any output.&lt;/P&gt;&lt;P&gt;That makes sense, because i don't have a &lt;EM&gt;%stp_begin &lt;/EM&gt;and &lt;EM&gt;%stp_end&lt;/EM&gt; in my STP, which is for my understanding the implemented &lt;EM&gt;standard-way&lt;/EM&gt; to stream a result. When i just click the Result capability &lt;EM&gt;Package&lt;/EM&gt;, i get following erorr:&lt;/P&gt;&lt;P&gt;&lt;IMG width="489" height="79" title="error_result_package.PNG" alt="error_result_package.PNG" src="https://communities.sas.com/t5/image/serverpage/image-id/7471i499CAC5B53C0A9BB/image-size/original?v=1.0&amp;amp;px=-1" border="0" /&gt;&lt;/P&gt;&lt;P&gt;Eventough i create a package, and publish it via e-mail to my client (and it works). So finally &lt;U&gt;&lt;STRONG&gt;my Qestion is&lt;/STRONG&gt;&lt;/U&gt;:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;1. Why do i get this error message?&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;2. Is there a &lt;EM&gt;standard-SAS-method&lt;/EM&gt; to create packages and publish them per e-mail?&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you in advance,&lt;/P&gt;&lt;P&gt;Felix&lt;/P&gt;</description>
      <pubDate>Mon, 27 Feb 2017 08:47:36 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Developers/Web-application-ERRORS-concerning-Result-capabilities/m-p/336119#M5249</guid>
      <dc:creator>Felix_</dc:creator>
      <dc:date>2017-02-27T08:47:36Z</dc:date>
    </item>
    <item>
      <title>Re: Web application ERRORS concerning Result capabilities</title>
      <link>https://communities.sas.com/t5/Developers/Web-application-ERRORS-concerning-Result-capabilities/m-p/336127#M5250</link>
      <description>&lt;P&gt;A STP for a web application needs to create at least some stream output, as the STP web interface expects this. If no stream is sent, you get your first error message.&lt;/P&gt;
&lt;P&gt;Your STP should send some stream output like "The operation was successful".&lt;/P&gt;
&lt;P&gt;If you only want package output, you have to use the %stp_begin and %stp_end macros, as they set up the expected package output.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;My preferred method for publishing would be&lt;/P&gt;
&lt;P&gt;- don't use %stp_begin and %stp_end&lt;/P&gt;
&lt;P&gt;- don't create a package; de-select package output&lt;/P&gt;
&lt;P&gt;- create tables and/or HTML output on the server; HTML in a subdirectory where the web server has access (DocumentRoot and subdirs). "HTML" here also means downloadable content (text, csv, etc)&lt;/P&gt;
&lt;P&gt;- send email from SAS (filename mail) to the recipients with a message that content has been created; include links to that content.&lt;/P&gt;
&lt;P&gt;- satisfy streaming output by writing a success (or non-success) message to _webout (use HTML code).&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Keeping results out of the email prevents problems caused by emails grwoing larger than mail servers tolerate.&lt;/P&gt;</description>
      <pubDate>Mon, 27 Feb 2017 09:32:49 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Developers/Web-application-ERRORS-concerning-Result-capabilities/m-p/336127#M5250</guid>
      <dc:creator>Kurt_Bremser</dc:creator>
      <dc:date>2017-02-27T09:32:49Z</dc:date>
    </item>
  </channel>
</rss>

