<?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: How to export  selected datasets from library using proc export in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/How-to-export-selected-datasets-from-library-using-proc-export/m-p/723826#M224687</link>
    <description>&lt;P&gt;proc export deals with one datset at a time.&lt;/P&gt;
&lt;P&gt;If you want to reduce programming create a macro program and supply the dataset names as argument:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;%macro xprt(dsnames);
    %let n = %sysfunc(countw(&amp;amp;dsnames));
    %do i=1 %to &amp;amp;n;
           %let dsn = %scan(&amp;amp;dsnames,&amp;amp;i);
            proc export data=&amp;amp;dsn ... ;
                  .... other options ...
            run;
     %end;
%mend xprt;
%xprt(data1 data3 data4 ...);&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;You can define, similarly, a list of excell filenames or use a fix prefix with appropriate suffix like&amp;nbsp;&amp;nbsp;XLDATA&amp;amp;i&amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Fri, 05 Mar 2021 09:48:56 GMT</pubDate>
    <dc:creator>Shmuel</dc:creator>
    <dc:date>2021-03-05T09:48:56Z</dc:date>
    <item>
      <title>How to export  selected datasets from library using proc export</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-export-selected-datasets-from-library-using-proc-export/m-p/723816#M224680</link>
      <description>&lt;P&gt;Hi .&lt;/P&gt;&lt;P&gt;I have a library&amp;nbsp; 'mine' in&amp;nbsp; that&amp;nbsp; 6 datasets are there data1-data6..So I need to export only 3 datasets to excel along with the contents dataset for those three also. How to do export using proc export.is there any options or statements to give selected datasets in proc export.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 05 Mar 2021 09:12:04 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-export-selected-datasets-from-library-using-proc-export/m-p/723816#M224680</guid>
      <dc:creator>sasuser123123</dc:creator>
      <dc:date>2021-03-05T09:12:04Z</dc:date>
    </item>
    <item>
      <title>Re: How to export  selected datasets from library using proc export</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-export-selected-datasets-from-library-using-proc-export/m-p/723826#M224687</link>
      <description>&lt;P&gt;proc export deals with one datset at a time.&lt;/P&gt;
&lt;P&gt;If you want to reduce programming create a macro program and supply the dataset names as argument:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;%macro xprt(dsnames);
    %let n = %sysfunc(countw(&amp;amp;dsnames));
    %do i=1 %to &amp;amp;n;
           %let dsn = %scan(&amp;amp;dsnames,&amp;amp;i);
            proc export data=&amp;amp;dsn ... ;
                  .... other options ...
            run;
     %end;
%mend xprt;
%xprt(data1 data3 data4 ...);&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;You can define, similarly, a list of excell filenames or use a fix prefix with appropriate suffix like&amp;nbsp;&amp;nbsp;XLDATA&amp;amp;i&amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 05 Mar 2021 09:48:56 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-export-selected-datasets-from-library-using-proc-export/m-p/723826#M224687</guid>
      <dc:creator>Shmuel</dc:creator>
      <dc:date>2021-03-05T09:48:56Z</dc:date>
    </item>
    <item>
      <title>Re: How to export  selected datasets from library using proc export</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-export-selected-datasets-from-library-using-proc-export/m-p/723846#M224698</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/282134"&gt;@sasuser123123&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;
&lt;P&gt;Hi .&lt;/P&gt;
&lt;P&gt;I have a library&amp;nbsp; 'mine' in&amp;nbsp; that&amp;nbsp; 6 datasets are there data1-data6..So I need to export only 3 datasets to excel along with the contents dataset for those three also. How to do export using proc export.is there any options or statements to give selected datasets in proc export.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;UL&gt;
&lt;LI&gt;proc export can only process one dataset with each call&lt;/LI&gt;
&lt;LI&gt;using the same filename will overwrite the file&lt;/LI&gt;
&lt;LI&gt;please explain what you mean by "along with the contents dataset"&lt;/LI&gt;
&lt;LI&gt;why do you have to use proc export?&lt;/LI&gt;
&lt;/UL&gt;</description>
      <pubDate>Fri, 05 Mar 2021 11:36:11 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-export-selected-datasets-from-library-using-proc-export/m-p/723846#M224698</guid>
      <dc:creator>andreas_lds</dc:creator>
      <dc:date>2021-03-05T11:36:11Z</dc:date>
    </item>
  </channel>
</rss>

