<?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: Combining 100+ daily sas datasets into 1 in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Combining-100-daily-sas-datasets-into-1/m-p/737141#M229771</link>
    <description>&lt;P&gt;BTW, why are you concatenating all the data sets into a data set file?&amp;nbsp; You could instead concatenate into a data set view.&amp;nbsp; &amp;nbsp;The view would be nothing more than a just-in-time concatenation, and you would save disk space by avoiding needless duplication of the data (you were going to keep the daily files, right?).&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data ttrm_view / view=ttrm_view;
  set ttt.trms:   open=defer;
run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;This will take about a half-second to create, yet you can treat it just like the data set file you proposed to create, (even though it doesn't add to your disk requirements).&amp;nbsp; I.e. you can apply PROC FREQ, PROC REG, etc. to ttrm_view.&lt;/P&gt;</description>
    <pubDate>Tue, 27 Apr 2021 11:06:43 GMT</pubDate>
    <dc:creator>mkeintz</dc:creator>
    <dc:date>2021-04-27T11:06:43Z</dc:date>
    <item>
      <title>Combining 100+ daily sas datasets into 1</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Combining-100-daily-sas-datasets-into-1/m-p/737138#M229769</link>
      <description>&lt;P&gt;Hi all,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have daily sas dataset that i need to combine into 1.&lt;/P&gt;&lt;P&gt;Naming convention is:&amp;nbsp;TRMS_20210421&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I tried:&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;DATA Test;&lt;BR /&gt;MERGE TTT.TRMS:;&lt;BR /&gt;RUN;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I get the output like below but the final output is not all the records... What could be the problem?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I even tried saving it into my personal sas folder which has higher space allowance.&lt;/P&gt;&lt;P&gt;Is there a better way to do this?&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;NOTE: There were 12085 observations read from the data set TTT.TRMS_20210411.&lt;BR /&gt;NOTE: There were 9076 observations read from the data set TTT.TRMS_20210412.&lt;BR /&gt;NOTE: There were 51500 observations read from the data set TTT.TRMS_20210413.&lt;BR /&gt;NOTE: There were 47332 observations read from the data set TTT.TRMS_20210414.&lt;BR /&gt;NOTE: There were 33850 observations read from the data set TTT.TRMS_20210415.&lt;BR /&gt;NOTE: There were 35832 observations read from the data set TTT.TRMS_20210416.&lt;BR /&gt;NOTE: There were 42361 observations read from the data set TTT.TRMS_20210417.&lt;BR /&gt;NOTE: There were 10540 observations read from the data set TTT.TRMS_20210418.&lt;BR /&gt;NOTE: There were 7956 observations read from the data set TTT.TRMS_20210419.&lt;BR /&gt;NOTE: There were 60246 observations read from the data set TTT.TRMS_20210420.&lt;BR /&gt;NOTE: There were 52694 observations read from the data set TTT.TRMS_20210421.&lt;BR /&gt;NOTE: There were 37624 observations read from the data set TTT.TRMS_20210422.&lt;BR /&gt;NOTE: There were 31465 observations read from the data set TTT.TRMS_20210423.&lt;BR /&gt;NOTE: There were 33209 observations read from the data set TTT.TRMS_20210424.&lt;BR /&gt;NOTE: There were 9406 observations read from the data set TTT.TRMS_20210425.&lt;BR /&gt;NOTE: There were 6829 observations read from the data set TTT.TRMS_20210426.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;NOTE: The data set Test has 83573 observations and 4 variables.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 27 Apr 2021 00:39:58 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Combining-100-daily-sas-datasets-into-1/m-p/737138#M229769</guid>
      <dc:creator>TheNovice</dc:creator>
      <dc:date>2021-04-27T00:39:58Z</dc:date>
    </item>
    <item>
      <title>Re: Combining 100+ daily sas datasets into 1</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Combining-100-daily-sas-datasets-into-1/m-p/737140#M229770</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/248692"&gt;@TheNovice&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;
&lt;P&gt;Hi all,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I have daily sas dataset that i need to combine into 1.&lt;/P&gt;
&lt;P&gt;Naming convention is:&amp;nbsp;TRMS_20210421&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I tried:&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;DATA Test;&lt;BR /&gt;MERGE TTT.TRMS:;&lt;BR /&gt;RUN;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I get the output like below but the final output is not all the records... What could be the problem?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I even tried saving it into my personal sas folder which has higher space allowance.&lt;/P&gt;
&lt;P&gt;Is there a better way to do this?&lt;/P&gt;
&lt;P&gt;&lt;BR /&gt;NOTE: There were 12085 observations read from the data set TTT.TRMS_20210411.&lt;BR /&gt;NOTE: There were 9076 observations read from the data set TTT.TRMS_20210412.&lt;BR /&gt;NOTE: There were 51500 observations read from the data set TTT.TRMS_20210413.&lt;BR /&gt;NOTE: There were 47332 observations read from the data set TTT.TRMS_20210414.&lt;BR /&gt;NOTE: There were 33850 observations read from the data set TTT.TRMS_20210415.&lt;BR /&gt;NOTE: There were 35832 observations read from the data set TTT.TRMS_20210416.&lt;BR /&gt;NOTE: There were 42361 observations read from the data set TTT.TRMS_20210417.&lt;BR /&gt;NOTE: There were 10540 observations read from the data set TTT.TRMS_20210418.&lt;BR /&gt;NOTE: There were 7956 observations read from the data set TTT.TRMS_20210419.&lt;BR /&gt;NOTE: There were 60246 observations read from the data set TTT.TRMS_20210420.&lt;BR /&gt;NOTE: There were 52694 observations read from the data set TTT.TRMS_20210421.&lt;BR /&gt;NOTE: There were 37624 observations read from the data set TTT.TRMS_20210422.&lt;BR /&gt;NOTE: There were 31465 observations read from the data set TTT.TRMS_20210423.&lt;BR /&gt;NOTE: There were 33209 observations read from the data set TTT.TRMS_20210424.&lt;BR /&gt;NOTE: There were 9406 observations read from the data set TTT.TRMS_20210425.&lt;BR /&gt;NOTE: There were 6829 observations read from the data set TTT.TRMS_20210426.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;NOTE: The data set Test has 83573 observations and 4 variables.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;You did not run out of space.&amp;nbsp; You produced only 83,573 observations because you used MERGE instead of SET.&amp;nbsp; &amp;nbsp;Merge joins the first obs from each dataset into a single obs, then the second obs into each dataset into one output obs, etc, while a SET statement would concatenate observations.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;However, I am surprised that you got 83,573.&amp;nbsp; It should have been equal to the largest input data set (looks like 60,246 obs from 20210420).&lt;/P&gt;</description>
      <pubDate>Tue, 27 Apr 2021 01:14:56 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Combining-100-daily-sas-datasets-into-1/m-p/737140#M229770</guid>
      <dc:creator>mkeintz</dc:creator>
      <dc:date>2021-04-27T01:14:56Z</dc:date>
    </item>
    <item>
      <title>Re: Combining 100+ daily sas datasets into 1</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Combining-100-daily-sas-datasets-into-1/m-p/737141#M229771</link>
      <description>&lt;P&gt;BTW, why are you concatenating all the data sets into a data set file?&amp;nbsp; You could instead concatenate into a data set view.&amp;nbsp; &amp;nbsp;The view would be nothing more than a just-in-time concatenation, and you would save disk space by avoiding needless duplication of the data (you were going to keep the daily files, right?).&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data ttrm_view / view=ttrm_view;
  set ttt.trms:   open=defer;
run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;This will take about a half-second to create, yet you can treat it just like the data set file you proposed to create, (even though it doesn't add to your disk requirements).&amp;nbsp; I.e. you can apply PROC FREQ, PROC REG, etc. to ttrm_view.&lt;/P&gt;</description>
      <pubDate>Tue, 27 Apr 2021 11:06:43 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Combining-100-daily-sas-datasets-into-1/m-p/737141#M229771</guid>
      <dc:creator>mkeintz</dc:creator>
      <dc:date>2021-04-27T11:06:43Z</dc:date>
    </item>
    <item>
      <title>Re: Combining 100+ daily sas datasets into 1</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Combining-100-daily-sas-datasets-into-1/m-p/737142#M229772</link>
      <description>&lt;P&gt;Wow, thank you so much. I don't use the merge function much. Bad mistake. The combine worked correctly now.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;as for the output i got, I had only posted a portion of the logs for ease of reading.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;thank you so much&lt;/P&gt;</description>
      <pubDate>Tue, 27 Apr 2021 01:20:53 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Combining-100-daily-sas-datasets-into-1/m-p/737142#M229772</guid>
      <dc:creator>TheNovice</dc:creator>
      <dc:date>2021-04-27T01:20:53Z</dc:date>
    </item>
    <item>
      <title>Re: Combining 100+ daily sas datasets into 1</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Combining-100-daily-sas-datasets-into-1/m-p/737143#M229773</link>
      <description>oh, i didn't even know that was possible. I will do this instead. Can I still apply other sql procedures to it ?&lt;BR /&gt;&lt;BR /&gt;The daily files are kept in the teams local folder.</description>
      <pubDate>Tue, 27 Apr 2021 01:22:39 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Combining-100-daily-sas-datasets-into-1/m-p/737143#M229773</guid>
      <dc:creator>TheNovice</dc:creator>
      <dc:date>2021-04-27T01:22:39Z</dc:date>
    </item>
    <item>
      <title>Re: Combining 100+ daily sas datasets into 1</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Combining-100-daily-sas-datasets-into-1/m-p/737148#M229774</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/248692"&gt;@TheNovice&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;oh, i didn't even know that was possible. I will do this instead. Can I still apply other sql procedures to it ?&lt;BR /&gt;&lt;BR /&gt;The daily files are kept in the teams local folder.&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;OL&gt;
&lt;LI&gt;Yes.&lt;BR /&gt;&lt;BR /&gt;&lt;/LI&gt;
&lt;LI&gt;If the "teams local folder" is local to your process then fine.&amp;nbsp; But if it is in a remote location, then there could be an advantage to making a local data set FILE instead of a data set view - due to the time penalty of accessing remote data whenever the data set view is utilized.&amp;nbsp;&lt;/LI&gt;
&lt;/OL&gt;</description>
      <pubDate>Tue, 27 Apr 2021 02:24:22 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Combining-100-daily-sas-datasets-into-1/m-p/737148#M229774</guid>
      <dc:creator>mkeintz</dc:creator>
      <dc:date>2021-04-27T02:24:22Z</dc:date>
    </item>
    <item>
      <title>Re: Combining 100+ daily sas datasets into 1</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Combining-100-daily-sas-datasets-into-1/m-p/737150#M229775</link>
      <description>&lt;P&gt;Thank you again&lt;/P&gt;</description>
      <pubDate>Tue, 27 Apr 2021 02:29:35 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Combining-100-daily-sas-datasets-into-1/m-p/737150#M229775</guid>
      <dc:creator>TheNovice</dc:creator>
      <dc:date>2021-04-27T02:29:35Z</dc:date>
    </item>
  </channel>
</rss>

