<?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: Download SAS dataset from stored process in Developers</title>
    <link>https://communities.sas.com/t5/Developers/Download-SAS-dataset-from-stored-process/m-p/352133#M5330</link>
    <description>&lt;P&gt;&lt;FONT face="verdana,geneva"&gt;Try something like this:&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;*  Set up a test table in WORK, but could be a permanent library;

%let MYLIB=work;
data &amp;amp;MYLIB..class; set sashelp.class; run;

*  Write the data set to _WEBOUT;

%let RV=%sysfunc(appsrv_header(Content-type,application/x-sas-data)); 
%let RV=%sysfunc(appsrv_header(Content-disposition,%str(attachment; filename="Class.sas7bdat")));

filename temp "%sysfunc(pathname(&amp;amp;MYLIB))\class.sas7bdat";

data _null_;
infile temp   recfm=f lrecl=1;
file  _webout recfm=n;
input;
put _infile_;
run;
&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&lt;FONT face="verdana,geneva"&gt;Vince DelGobbo&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="verdana,geneva"&gt;SAS R&amp;amp;D&lt;/FONT&gt;&lt;/P&gt;</description>
    <pubDate>Fri, 21 Apr 2017 12:15:47 GMT</pubDate>
    <dc:creator>Vince_SAS</dc:creator>
    <dc:date>2017-04-21T12:15:47Z</dc:date>
    <item>
      <title>Download SAS dataset from stored process</title>
      <link>https://communities.sas.com/t5/Developers/Download-SAS-dataset-from-stored-process/m-p/351351#M5329</link>
      <description>&lt;P&gt;I am creating a stored process which uses the streaming output to generate a result in various format. One of the desired Output is to give business user ability to download result in form of SAS dataset so that they don't have to worry about importing the spreadsheet into sas&amp;nbsp;everytime.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Please guide me with the best approach. Thanks&lt;/P&gt;</description>
      <pubDate>Wed, 19 Apr 2017 15:51:18 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Developers/Download-SAS-dataset-from-stored-process/m-p/351351#M5329</guid>
      <dc:creator>mrg1212005</dc:creator>
      <dc:date>2017-04-19T15:51:18Z</dc:date>
    </item>
    <item>
      <title>Re: Download SAS dataset from stored process</title>
      <link>https://communities.sas.com/t5/Developers/Download-SAS-dataset-from-stored-process/m-p/352133#M5330</link>
      <description>&lt;P&gt;&lt;FONT face="verdana,geneva"&gt;Try something like this:&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;*  Set up a test table in WORK, but could be a permanent library;

%let MYLIB=work;
data &amp;amp;MYLIB..class; set sashelp.class; run;

*  Write the data set to _WEBOUT;

%let RV=%sysfunc(appsrv_header(Content-type,application/x-sas-data)); 
%let RV=%sysfunc(appsrv_header(Content-disposition,%str(attachment; filename="Class.sas7bdat")));

filename temp "%sysfunc(pathname(&amp;amp;MYLIB))\class.sas7bdat";

data _null_;
infile temp   recfm=f lrecl=1;
file  _webout recfm=n;
input;
put _infile_;
run;
&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&lt;FONT face="verdana,geneva"&gt;Vince DelGobbo&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="verdana,geneva"&gt;SAS R&amp;amp;D&lt;/FONT&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 21 Apr 2017 12:15:47 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Developers/Download-SAS-dataset-from-stored-process/m-p/352133#M5330</guid>
      <dc:creator>Vince_SAS</dc:creator>
      <dc:date>2017-04-21T12:15:47Z</dc:date>
    </item>
  </channel>
</rss>

