<?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: Split data into different sub datasets in New SAS User</title>
    <link>https://communities.sas.com/t5/New-SAS-User/Split-data-into-different-sub-datasets/m-p/761851#M30340</link>
    <description>&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data
  before
  inbetween
  after
;
set have;
if year lt 1970 then output before;
else if .... /* add other conditional outputs */
run;&lt;/CODE&gt;&lt;/PRE&gt;</description>
    <pubDate>Mon, 16 Aug 2021 16:06:37 GMT</pubDate>
    <dc:creator>Kurt_Bremser</dc:creator>
    <dc:date>2021-08-16T16:06:37Z</dc:date>
    <item>
      <title>Split data into different sub datasets</title>
      <link>https://communities.sas.com/t5/New-SAS-User/Split-data-into-different-sub-datasets/m-p/761844#M30339</link>
      <description>&lt;P&gt;Hi All,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I'm new to SAS programming. Want to know how I can&amp;nbsp;split my data into three sub-datasets: data before 1970, data&lt;BR /&gt;between 1970 to 1979 and data from 1980 onwards.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;This is my current dataset:&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="beekee_0-1629128340917.png" style="width: 400px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/62634i206DE0B37DAEB4D0/image-size/medium?v=v2&amp;amp;px=400" role="button" title="beekee_0-1629128340917.png" alt="beekee_0-1629128340917.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;This is my current code:&lt;/P&gt;&lt;P&gt;data ANL351.tourism;&lt;BR /&gt;infile "/home/u59111097/TMA/tourism.csv" dlm=',' FIRSTOBS = 2;&lt;BR /&gt;input year vsp pdi puk exuk pop cpisp exsp;&lt;BR /&gt;run;&lt;/P&gt;&lt;P&gt;proc contents data=ANL351.tourism;&lt;BR /&gt;run;&lt;/P&gt;&lt;P&gt;proc print data=ANL351.tourism;&lt;BR /&gt;run;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you.&lt;/P&gt;</description>
      <pubDate>Mon, 16 Aug 2021 15:40:26 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/Split-data-into-different-sub-datasets/m-p/761844#M30339</guid>
      <dc:creator>beekee</dc:creator>
      <dc:date>2021-08-16T15:40:26Z</dc:date>
    </item>
    <item>
      <title>Re: Split data into different sub datasets</title>
      <link>https://communities.sas.com/t5/New-SAS-User/Split-data-into-different-sub-datasets/m-p/761851#M30340</link>
      <description>&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data
  before
  inbetween
  after
;
set have;
if year lt 1970 then output before;
else if .... /* add other conditional outputs */
run;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Mon, 16 Aug 2021 16:06:37 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/Split-data-into-different-sub-datasets/m-p/761851#M30340</guid>
      <dc:creator>Kurt_Bremser</dc:creator>
      <dc:date>2021-08-16T16:06:37Z</dc:date>
    </item>
    <item>
      <title>Re: Split data into different sub datasets</title>
      <link>https://communities.sas.com/t5/New-SAS-User/Split-data-into-different-sub-datasets/m-p/761855#M30341</link>
      <description>&lt;P&gt;The easiest solution, which is also the best solution in my opinion, is the leave the data set as one large data set and do not split it.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;What is your need to have this data split? How would splitting the data set provide benefits? What can you do with split data sets that you can't do with the un-split data set?&lt;/P&gt;</description>
      <pubDate>Mon, 16 Aug 2021 16:14:24 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/Split-data-into-different-sub-datasets/m-p/761855#M30341</guid>
      <dc:creator>PaigeMiller</dc:creator>
      <dc:date>2021-08-16T16:14:24Z</dc:date>
    </item>
    <item>
      <title>Re: Split data into different sub datasets</title>
      <link>https://communities.sas.com/t5/New-SAS-User/Split-data-into-different-sub-datasets/m-p/761889#M30343</link>
      <description>Usually it isn't useful to do that in SAS, instead you would create a new variable that indicated the decade and then use BY group processing. &lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Mon, 16 Aug 2021 19:08:40 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/Split-data-into-different-sub-datasets/m-p/761889#M30343</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2021-08-16T19:08:40Z</dc:date>
    </item>
  </channel>
</rss>

