<?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: sas data in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/sas-data/m-p/258668#M49873</link>
    <description>&lt;P&gt;And if you have SAS/STAT 13.1 or higher, you can use PROC SURVEYSELECT also to literally select&amp;nbsp;every 5th observation (without any random component):&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc surveyselect data=a out=b
method=sys(start=5) rate=0.2;
run;&lt;/CODE&gt;&lt;/PRE&gt;</description>
    <pubDate>Wed, 23 Mar 2016 23:16:18 GMT</pubDate>
    <dc:creator>FreelanceReinh</dc:creator>
    <dc:date>2016-03-23T23:16:18Z</dc:date>
    <item>
      <title>sas data</title>
      <link>https://communities.sas.com/t5/SAS-Programming/sas-data/m-p/258299#M49743</link>
      <description>&lt;P&gt;hi friends ,&lt;/P&gt;&lt;P&gt;any body clearify my doute ,&lt;/P&gt;&lt;P&gt;data set " A" have 100 observations(inputdataset), "B" output dataset,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;in dataset " A" ,every 5th observation should come to data set "B" ,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;let me clearify me?&lt;/P&gt;</description>
      <pubDate>Tue, 22 Mar 2016 17:55:21 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/sas-data/m-p/258299#M49743</guid>
      <dc:creator>ganeshsas764</dc:creator>
      <dc:date>2016-03-22T17:55:21Z</dc:date>
    </item>
    <item>
      <title>Re: sas data</title>
      <link>https://communities.sas.com/t5/SAS-Programming/sas-data/m-p/258305#M49744</link>
      <description>One way to do this would be:&lt;BR /&gt;&lt;BR /&gt;DATA B (DROP=count);&lt;BR /&gt;SET A;&lt;BR /&gt;RETAIN count 1;&lt;BR /&gt;IF count = 5 THEN DO;&lt;BR /&gt;OUTPUT;&lt;BR /&gt;count = 1;&lt;BR /&gt;END;&lt;BR /&gt;ELSE&lt;BR /&gt;count =count + 1;&lt;BR /&gt;RUN;</description>
      <pubDate>Tue, 22 Mar 2016 18:07:23 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/sas-data/m-p/258305#M49744</guid>
      <dc:creator>Davanden</dc:creator>
      <dc:date>2016-03-22T18:07:23Z</dc:date>
    </item>
    <item>
      <title>Re: sas data</title>
      <link>https://communities.sas.com/t5/SAS-Programming/sas-data/m-p/258312#M49745</link>
      <description>&lt;P&gt;or more simply:&lt;/P&gt;
&lt;P&gt;data b;&lt;/P&gt;
&lt;P&gt;&amp;nbsp; &amp;nbsp;set a;&lt;/P&gt;
&lt;P&gt;&amp;nbsp; &amp;nbsp;if mod(_n_,5) = 0 then output;&lt;/P&gt;
&lt;P&gt;run;&lt;/P&gt;</description>
      <pubDate>Tue, 22 Mar 2016 18:15:38 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/sas-data/m-p/258312#M49745</guid>
      <dc:creator>mbuchecker</dc:creator>
      <dc:date>2016-03-22T18:15:38Z</dc:date>
    </item>
    <item>
      <title>Re: sas data</title>
      <link>https://communities.sas.com/t5/SAS-Programming/sas-data/m-p/258428#M49770</link>
      <description>&lt;P&gt;The previous examples read every row then output every 5th.&lt;/P&gt;
&lt;P&gt;Fine for a one-off run&amp;nbsp;or a small sample.&lt;/P&gt;
&lt;P&gt;This&amp;nbsp;is more efficient technique which only reads every 5th row but it's slightly more code.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;data b;&lt;/P&gt;
&lt;P&gt;&amp;nbsp; do i = 1 to rows by 5;&lt;/P&gt;
&lt;P&gt;&amp;nbsp; set a point=i nobs=rows;&lt;/P&gt;
&lt;P&gt;&amp;nbsp; output;&lt;/P&gt;
&lt;P&gt;&amp;nbsp; end;&lt;/P&gt;
&lt;P&gt;stop;&lt;/P&gt;
&lt;P&gt;run;&lt;/P&gt;</description>
      <pubDate>Wed, 23 Mar 2016 09:05:17 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/sas-data/m-p/258428#M49770</guid>
      <dc:creator>PeterHobart</dc:creator>
      <dc:date>2016-03-23T09:05:17Z</dc:date>
    </item>
    <item>
      <title>Re: sas data</title>
      <link>https://communities.sas.com/t5/SAS-Programming/sas-data/m-p/258431#M49772</link>
      <description>&lt;P&gt;One more option, if you have SAS/Stat.&lt;/P&gt;
&lt;P&gt;this will generate a randon 20% sample&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="Courier New" size="3"&gt;&lt;FONT face="Courier New"&gt;proc surveyselect data=a out=b&lt;BR /&gt;rate=0.2;&lt;BR /&gt;run;&lt;BR /&gt;quit;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 23 Mar 2016 09:14:00 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/sas-data/m-p/258431#M49772</guid>
      <dc:creator>PeterHobart</dc:creator>
      <dc:date>2016-03-23T09:14:00Z</dc:date>
    </item>
    <item>
      <title>Re: sas data</title>
      <link>https://communities.sas.com/t5/SAS-Programming/sas-data/m-p/258668#M49873</link>
      <description>&lt;P&gt;And if you have SAS/STAT 13.1 or higher, you can use PROC SURVEYSELECT also to literally select&amp;nbsp;every 5th observation (without any random component):&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc surveyselect data=a out=b
method=sys(start=5) rate=0.2;
run;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Wed, 23 Mar 2016 23:16:18 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/sas-data/m-p/258668#M49873</guid>
      <dc:creator>FreelanceReinh</dc:creator>
      <dc:date>2016-03-23T23:16:18Z</dc:date>
    </item>
  </channel>
</rss>

