<?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 Proc Export SAS database has more rows than Excel in New SAS User</title>
    <link>https://communities.sas.com/t5/New-SAS-User/Proc-Export-SAS-database-has-more-rows-than-Excel/m-p/616302#M18885</link>
    <description>&lt;P&gt;I have a large database (more than 10M obs) and I want to export to Excel which caps the obs at just over 1M.&amp;nbsp; I want to take the top 1M obs (using the value of one variable) and export just those 1M into Excel.&amp;nbsp; How can I limit the obs exported to Excel?&lt;/P&gt;</description>
    <pubDate>Thu, 09 Jan 2020 19:44:21 GMT</pubDate>
    <dc:creator>texasmfp</dc:creator>
    <dc:date>2020-01-09T19:44:21Z</dc:date>
    <item>
      <title>Proc Export SAS database has more rows than Excel</title>
      <link>https://communities.sas.com/t5/New-SAS-User/Proc-Export-SAS-database-has-more-rows-than-Excel/m-p/616302#M18885</link>
      <description>&lt;P&gt;I have a large database (more than 10M obs) and I want to export to Excel which caps the obs at just over 1M.&amp;nbsp; I want to take the top 1M obs (using the value of one variable) and export just those 1M into Excel.&amp;nbsp; How can I limit the obs exported to Excel?&lt;/P&gt;</description>
      <pubDate>Thu, 09 Jan 2020 19:44:21 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/Proc-Export-SAS-database-has-more-rows-than-Excel/m-p/616302#M18885</guid>
      <dc:creator>texasmfp</dc:creator>
      <dc:date>2020-01-09T19:44:21Z</dc:date>
    </item>
    <item>
      <title>Re: Proc Export SAS database has more rows than Excel</title>
      <link>https://communities.sas.com/t5/New-SAS-User/Proc-Export-SAS-database-has-more-rows-than-Excel/m-p/616307#M18889</link>
      <description>&lt;P&gt;Use the obs= dataset option.&lt;/P&gt;</description>
      <pubDate>Thu, 09 Jan 2020 20:08:07 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/Proc-Export-SAS-database-has-more-rows-than-Excel/m-p/616307#M18889</guid>
      <dc:creator>Kurt_Bremser</dc:creator>
      <dc:date>2020-01-09T20:08:07Z</dc:date>
    </item>
    <item>
      <title>Re: Proc Export SAS database has more rows than Excel</title>
      <link>https://communities.sas.com/t5/New-SAS-User/Proc-Export-SAS-database-has-more-rows-than-Excel/m-p/616326#M18893</link>
      <description>&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc sort data=have out=top_1M (obs=1000000);
by descending one_variable;
run;

proc export 
  data=top_1M 
  dbms=xlsx 
  outfile="C:\somepath\somefilename.xlsx" 
  replace;
run;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Thu, 09 Jan 2020 21:09:44 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/Proc-Export-SAS-database-has-more-rows-than-Excel/m-p/616326#M18893</guid>
      <dc:creator>JeffMaggio</dc:creator>
      <dc:date>2020-01-09T21:09:44Z</dc:date>
    </item>
    <item>
      <title>Re: Proc Export SAS database has more rows than Excel</title>
      <link>https://communities.sas.com/t5/New-SAS-User/Proc-Export-SAS-database-has-more-rows-than-Excel/m-p/616332#M18894</link>
      <description>&lt;P&gt;Thanks Jeff:&amp;nbsp; I thought that would work, but it failed to limit the obs:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;42   proc sort data= inlib.&amp;amp;full_set nodup out=top_set (obs=1000000);
43   by descending sum;
44   run;

NOTE: There were 9882141 observations read from the data set INLIB.FULL_SET.
NOTE: 190767 duplicate observations were deleted.
NOTE: The data set WORK.TOP_SET has 9691374 observations and 11 variables.
NOTE: PROCEDURE SORT used (Total process time):
      real time           47.80 seconds
      cpu time            15.46 seconds

&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Thu, 09 Jan 2020 21:48:25 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/Proc-Export-SAS-database-has-more-rows-than-Excel/m-p/616332#M18894</guid>
      <dc:creator>texasmfp</dc:creator>
      <dc:date>2020-01-09T21:48:25Z</dc:date>
    </item>
    <item>
      <title>Re: Proc Export SAS database has more rows than Excel</title>
      <link>https://communities.sas.com/t5/New-SAS-User/Proc-Export-SAS-database-has-more-rows-than-Excel/m-p/616334#M18895</link>
      <description>&lt;P&gt;Use the dataset option on the incoming dataset.&lt;/P&gt;</description>
      <pubDate>Thu, 09 Jan 2020 21:57:15 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/Proc-Export-SAS-database-has-more-rows-than-Excel/m-p/616334#M18895</guid>
      <dc:creator>Kurt_Bremser</dc:creator>
      <dc:date>2020-01-09T21:57:15Z</dc:date>
    </item>
    <item>
      <title>Re: Proc Export SAS database has more rows than Excel</title>
      <link>https://communities.sas.com/t5/New-SAS-User/Proc-Export-SAS-database-has-more-rows-than-Excel/m-p/616335#M18896</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/296215"&gt;@texasmfp&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;
&lt;P&gt;Thanks Jeff:&amp;nbsp; I thought that would work, but it failed to limit the obs:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;42   proc sort data= inlib.&amp;amp;full_set nodup out=top_set (obs=1000000);
43   by descending sum;
44   run;

NOTE: There were 9882141 observations read from the data set INLIB.FULL_SET.
NOTE: 190767 duplicate observations were deleted.
NOTE: The data set WORK.TOP_SET has 9691374 observations and 11 variables.
NOTE: PROCEDURE SORT used (Total process time):
      real time           47.80 seconds
      cpu time            15.46 seconds

&lt;/CODE&gt;&lt;/PRE&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;You need to use OBS= on an INPUT dataset.&amp;nbsp; You are trying to use it on an OUTPUT dataset.&lt;/P&gt;</description>
      <pubDate>Thu, 09 Jan 2020 21:57:59 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/Proc-Export-SAS-database-has-more-rows-than-Excel/m-p/616335#M18896</guid>
      <dc:creator>Tom</dc:creator>
      <dc:date>2020-01-09T21:57:59Z</dc:date>
    </item>
    <item>
      <title>Re: Proc Export SAS database has more rows than Excel</title>
      <link>https://communities.sas.com/t5/New-SAS-User/Proc-Export-SAS-database-has-more-rows-than-Excel/m-p/616364#M18901</link>
      <description>&lt;P&gt;This worked.&amp;nbsp; Thanks to all.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data inlib.&amp;amp;top_set;
set top_set (obs=10000);
run;

proc export 
  data=inlib.&amp;amp;top_set 
  outfile="&amp;amp;ROOT\9 Primary Targets (2018 Data) Summary.xlsx"
  dbms=xlsx replace;
    SHEET="Raw";
run;
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Fri, 10 Jan 2020 01:36:41 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/Proc-Export-SAS-database-has-more-rows-than-Excel/m-p/616364#M18901</guid>
      <dc:creator>texasmfp</dc:creator>
      <dc:date>2020-01-10T01:36:41Z</dc:date>
    </item>
  </channel>
</rss>

