<?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: Optimization - concatenate multiple views in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Optimization-concatenate-multiple-views/m-p/626212#M184662</link>
    <description>PROC APPEND will be slightly faster but if you're appending 36 files that are each about 1 million records your main file will be 36 million records, which is a big file, think a few gigabytes. &lt;BR /&gt;&lt;BR /&gt;It all really depends on what you're doing next.</description>
    <pubDate>Thu, 20 Feb 2020 16:30:43 GMT</pubDate>
    <dc:creator>Reeza</dc:creator>
    <dc:date>2020-02-20T16:30:43Z</dc:date>
    <item>
      <title>Optimization - concatenate multiple views</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Optimization-concatenate-multiple-views/m-p/626184#M184654</link>
      <description>&lt;P&gt;I have a macro: %macro tab(start_date, periods),&amp;nbsp;which creates multiple views dependent on the start date and number of periods.&lt;/P&gt;&lt;P&gt;For example: %tab(201701, 36) creates views: tab_201701, tab_201702,tab_201703,...tab_201912, tab_202001.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I want&amp;nbsp;to concatenante this views and create &lt;STRONG&gt;table:&lt;/STRONG&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data all_tab;
set WORK.tab_:;
by id1 id2;
run;

/*or*/

data all_tab;
set WORK.tab_: open=defer;
run;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;But these views have about from 700 thousands to 1,2 milion records and (only :)) 3 columns.&lt;/P&gt;&lt;P&gt;It takes a long time, and start date as well as number of periods can change (even start_date =201201), so the numer of views can be different. I know that I can create another view as: data all_tab/view=all_tab; ,&lt;/P&gt;&lt;P&gt;but I need the table - to make some operations on its&amp;nbsp;later.&lt;/P&gt;&lt;P&gt;Could you tell me what is better way to make this data step more efficient?:&lt;/P&gt;&lt;P&gt;&lt;FONT color="#000080" face="Courier New" size="2"&gt;&lt;STRONG&gt;data&lt;/STRONG&gt;&lt;/FONT&gt;&lt;FONT face="Courier New" size="2"&gt; all_tab;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#0000ff" face="Courier New" size="2"&gt;set&lt;/FONT&gt;&lt;FONT face="Courier New" size="2"&gt; WORK.tab_:;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#0000ff" face="Courier New" size="2"&gt;by&lt;/FONT&gt;&lt;FONT face="Courier New" size="2"&gt; id1 id2;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#000080" face="Courier New" size="2"&gt;&lt;STRONG&gt;run&lt;/STRONG&gt;&lt;/FONT&gt;&lt;FONT face="Courier New" size="2"&gt;;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I've read about hash tables but I don't know how use it&amp;nbsp;to concatenate views&amp;nbsp;WORK.tab_: and if&amp;nbsp;it works on views.&lt;/P&gt;&lt;P&gt;Thank you in advance.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 20 Feb 2020 15:38:16 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Optimization-concatenate-multiple-views/m-p/626184#M184654</guid>
      <dc:creator>MargoBlue</dc:creator>
      <dc:date>2020-02-20T15:38:16Z</dc:date>
    </item>
    <item>
      <title>Re: Optimization - concatenate multiple views</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Optimization-concatenate-multiple-views/m-p/626211#M184661</link>
      <description>PROC APPEND will be slightly faster but if you're appending 36 files that are each about 1 million records your main file will be 36 million records, which is a big file, think a few gigabytes. &lt;BR /&gt;&lt;BR /&gt;It all really depends on what you're doing next.</description>
      <pubDate>Thu, 20 Feb 2020 16:30:41 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Optimization-concatenate-multiple-views/m-p/626211#M184661</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2020-02-20T16:30:41Z</dc:date>
    </item>
    <item>
      <title>Re: Optimization - concatenate multiple views</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Optimization-concatenate-multiple-views/m-p/626212#M184662</link>
      <description>PROC APPEND will be slightly faster but if you're appending 36 files that are each about 1 million records your main file will be 36 million records, which is a big file, think a few gigabytes. &lt;BR /&gt;&lt;BR /&gt;It all really depends on what you're doing next.</description>
      <pubDate>Thu, 20 Feb 2020 16:30:43 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Optimization-concatenate-multiple-views/m-p/626212#M184662</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2020-02-20T16:30:43Z</dc:date>
    </item>
  </channel>
</rss>

