<?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 file not found when called from _webout macro, but works in browser in Developers</title>
    <link>https://communities.sas.com/t5/Developers/file-not-found-when-called-from-webout-macro-but-works-in/m-p/564095#M5896</link>
    <description>&lt;P&gt;I have a stored process that is called from a VA stored process container. I have several radio buttons and dropdowns all working fine, but when I try to call a file, it will not render. I tried calling a second stored process that only contains the link to the file, but that did not work either. The message I keep getting is that the file does not exist. However when I cut and paste that file in the web browser, it will render.&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have tried using, what I thought would be the obvious answer:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;%let stpname=/DCPS Departments/Quick Reports/Stored Processes/QR MS Scorecard sp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;%macro display_form;&lt;BR /&gt;data _NULL_;&lt;BR /&gt;file _webout;&lt;/P&gt;&lt;P&gt;put "&amp;lt;html&amp;gt;";&lt;BR /&gt;put " &amp;lt;head&amp;gt;";&lt;BR /&gt;put " &amp;lt;style media='screen' type='text/css'&amp;gt;";&lt;BR /&gt;put " .border {border-width: 1px; border-style: solid;}";&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;put "&amp;lt;INPUT TYPE='HIDDEN' NAME='_program' VALUE='&amp;amp;stpname'&amp;gt;";&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;---bunch of code here---&lt;/P&gt;&lt;P&gt;put " &amp;lt;input type='submit' value='Generate Excel File' class='generate_report' style='font-weight: bold; font-size: 20px'&amp;gt;";&lt;/P&gt;&lt;P&gt;stop;&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;P&gt;%mend;&lt;/P&gt;&lt;P&gt;%macro main;&lt;/P&gt;&lt;P&gt;&amp;nbsp; ---buch of code here---&lt;/P&gt;&lt;P&gt;%mend;&lt;/P&gt;&lt;P&gt;%main;&lt;/P&gt;</description>
    <pubDate>Thu, 06 Jun 2019 13:57:34 GMT</pubDate>
    <dc:creator>cuevasj</dc:creator>
    <dc:date>2019-06-06T13:57:34Z</dc:date>
    <item>
      <title>file not found when called from _webout macro, but works in browser</title>
      <link>https://communities.sas.com/t5/Developers/file-not-found-when-called-from-webout-macro-but-works-in/m-p/564095#M5896</link>
      <description>&lt;P&gt;I have a stored process that is called from a VA stored process container. I have several radio buttons and dropdowns all working fine, but when I try to call a file, it will not render. I tried calling a second stored process that only contains the link to the file, but that did not work either. The message I keep getting is that the file does not exist. However when I cut and paste that file in the web browser, it will render.&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have tried using, what I thought would be the obvious answer:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;%let stpname=/DCPS Departments/Quick Reports/Stored Processes/QR MS Scorecard sp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;%macro display_form;&lt;BR /&gt;data _NULL_;&lt;BR /&gt;file _webout;&lt;/P&gt;&lt;P&gt;put "&amp;lt;html&amp;gt;";&lt;BR /&gt;put " &amp;lt;head&amp;gt;";&lt;BR /&gt;put " &amp;lt;style media='screen' type='text/css'&amp;gt;";&lt;BR /&gt;put " .border {border-width: 1px; border-style: solid;}";&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;put "&amp;lt;INPUT TYPE='HIDDEN' NAME='_program' VALUE='&amp;amp;stpname'&amp;gt;";&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;---bunch of code here---&lt;/P&gt;&lt;P&gt;put " &amp;lt;input type='submit' value='Generate Excel File' class='generate_report' style='font-weight: bold; font-size: 20px'&amp;gt;";&lt;/P&gt;&lt;P&gt;stop;&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;P&gt;%mend;&lt;/P&gt;&lt;P&gt;%macro main;&lt;/P&gt;&lt;P&gt;&amp;nbsp; ---buch of code here---&lt;/P&gt;&lt;P&gt;%mend;&lt;/P&gt;&lt;P&gt;%main;&lt;/P&gt;</description>
      <pubDate>Thu, 06 Jun 2019 13:57:34 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Developers/file-not-found-when-called-from-webout-macro-but-works-in/m-p/564095#M5896</guid>
      <dc:creator>cuevasj</dc:creator>
      <dc:date>2019-06-06T13:57:34Z</dc:date>
    </item>
    <item>
      <title>Re: file not found when called from _webout macro, but works in browser</title>
      <link>https://communities.sas.com/t5/Developers/file-not-found-when-called-from-webout-macro-but-works-in/m-p/570185#M5897</link>
      <description>&lt;P&gt;if you are returning a file from a stored process, you need to set the MIME type, eg as follows:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;DIV&gt;
&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;  /* now serve zip file to client */
  data _null_;
    rc = stpsrv_header('Content-type','application/zip');
    rc = stpsrv_header('Content-disposition',"attachment; filename=&amp;amp;table..zip");
  run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;/DIV&gt;</description>
      <pubDate>Mon, 01 Jul 2019 11:22:00 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Developers/file-not-found-when-called-from-webout-macro-but-works-in/m-p/570185#M5897</guid>
      <dc:creator>AllanBowe</dc:creator>
      <dc:date>2019-07-01T11:22:00Z</dc:date>
    </item>
  </channel>
</rss>

