<?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: Dividing a data from single column into groups of 20. in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Dividing-a-data-from-single-column-into-groups-of-20/m-p/841279#M332639</link>
    <description>Hey, I am required to provide unique leads of 20 customers every day to every sales officer my bank has, so I was thinking of dividing it into groups of 20 and then providing the leads to them sequentially.&lt;BR /&gt;If I can do it in a better way then please let me know.</description>
    <pubDate>Fri, 28 Oct 2022 09:20:26 GMT</pubDate>
    <dc:creator>Discaboota</dc:creator>
    <dc:date>2022-10-28T09:20:26Z</dc:date>
    <item>
      <title>Dividing a data from single column into groups of 20.</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Dividing-a-data-from-single-column-into-groups-of-20/m-p/841126#M332573</link>
      <description>&lt;P&gt;Hey guys, I am new to SAS and I have learned a lot from this community.&lt;BR /&gt;I want to divide the data of 4.5 million from a column into groups of 20, doesn't matter about the number of groups but the data keeps on increasing every day by around 10k so I need to code it so that my code can cope with increasing data.&lt;BR /&gt;Please Help. Thank you.&lt;/P&gt;</description>
      <pubDate>Thu, 27 Oct 2022 12:28:09 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Dividing-a-data-from-single-column-into-groups-of-20/m-p/841126#M332573</guid>
      <dc:creator>Discaboota</dc:creator>
      <dc:date>2022-10-27T12:28:09Z</dc:date>
    </item>
    <item>
      <title>Re: Dividing a data from single column into groups of 20.</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Dividing-a-data-from-single-column-into-groups-of-20/m-p/841127#M332574</link>
      <description>&lt;P&gt;Groups of 20 what?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Also, why do you want to split up your data? SAS can easily handle a data set of 4.5M obs.&lt;/P&gt;</description>
      <pubDate>Thu, 27 Oct 2022 12:30:08 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Dividing-a-data-from-single-column-into-groups-of-20/m-p/841127#M332574</guid>
      <dc:creator>PeterClemmensen</dc:creator>
      <dc:date>2022-10-27T12:30:08Z</dc:date>
    </item>
    <item>
      <title>Re: Dividing a data from single column into groups of 20.</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Dividing-a-data-from-single-column-into-groups-of-20/m-p/841131#M332577</link>
      <description>&lt;P&gt;Why? How does dividing data into groups of 20, however you define these groups, help anything?&lt;/P&gt;</description>
      <pubDate>Thu, 27 Oct 2022 12:46:39 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Dividing-a-data-from-single-column-into-groups-of-20/m-p/841131#M332577</guid>
      <dc:creator>PaigeMiller</dc:creator>
      <dc:date>2022-10-27T12:46:39Z</dc:date>
    </item>
    <item>
      <title>Re: Dividing a data from single column into groups of 20.</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Dividing-a-data-from-single-column-into-groups-of-20/m-p/841133#M332578</link>
      <description>&lt;P&gt;Not sure what you mean by divide?&amp;nbsp; Do you want to assign a GROUP variable?&amp;nbsp; Does it need to be random assignment?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If not then simply use their position in the dataset.&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data want;
  set have;
  group = ceil(_n_/20);
run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 27 Oct 2022 13:31:33 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Dividing-a-data-from-single-column-into-groups-of-20/m-p/841133#M332578</guid>
      <dc:creator>Tom</dc:creator>
      <dc:date>2022-10-27T13:31:33Z</dc:date>
    </item>
    <item>
      <title>Re: Dividing a data from single column into groups of 20.</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Dividing-a-data-from-single-column-into-groups-of-20/m-p/841279#M332639</link>
      <description>Hey, I am required to provide unique leads of 20 customers every day to every sales officer my bank has, so I was thinking of dividing it into groups of 20 and then providing the leads to them sequentially.&lt;BR /&gt;If I can do it in a better way then please let me know.</description>
      <pubDate>Fri, 28 Oct 2022 09:20:26 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Dividing-a-data-from-single-column-into-groups-of-20/m-p/841279#M332639</guid>
      <dc:creator>Discaboota</dc:creator>
      <dc:date>2022-10-28T09:20:26Z</dc:date>
    </item>
    <item>
      <title>Re: Dividing a data from single column into groups of 20.</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Dividing-a-data-from-single-column-into-groups-of-20/m-p/841280#M332640</link>
      <description>Thank you Tom for your help, it is what I was looking for. I am thinking of dividing the data into groups so that I can deliver groups sequentially to the required person.</description>
      <pubDate>Fri, 28 Oct 2022 09:23:58 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Dividing-a-data-from-single-column-into-groups-of-20/m-p/841280#M332640</guid>
      <dc:creator>Discaboota</dc:creator>
      <dc:date>2022-10-28T09:23:58Z</dc:date>
    </item>
    <item>
      <title>Re: Dividing a data from single column into groups of 20.</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Dividing-a-data-from-single-column-into-groups-of-20/m-p/841327#M332658</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/436607"&gt;@Discaboota&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;Thank you Tom for your help, it is what I was looking for. I am thinking of dividing the data into groups so that I can deliver groups sequentially to the required person.&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;If the original sequence is needed then perhaps the below. This increments a counter every 20 observations.&lt;/P&gt;
&lt;PRE&gt;data want;
  set have;
  retain group 1;
  if mod(_n_,20)=0 then group+1;
run;&lt;/PRE&gt;</description>
      <pubDate>Fri, 28 Oct 2022 15:53:13 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Dividing-a-data-from-single-column-into-groups-of-20/m-p/841327#M332658</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2022-10-28T15:53:13Z</dc:date>
    </item>
  </channel>
</rss>

