<?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: subsectioning the data in SAS Procedures</title>
    <link>https://communities.sas.com/t5/SAS-Procedures/subsectioning-the-data/m-p/47020#M12581</link>
    <description>Thank you all&lt;BR /&gt;
&lt;BR /&gt;
ballardw 	suggestion worked I actually used this:&lt;BR /&gt;
&lt;BR /&gt;
data new_data (keep=A1 A2 A3);&lt;BR /&gt;
set old_data (OBS=35);&lt;BR /&gt;
run;</description>
    <pubDate>Sat, 09 Apr 2011 15:20:56 GMT</pubDate>
    <dc:creator>R_A_G_</dc:creator>
    <dc:date>2011-04-09T15:20:56Z</dc:date>
    <item>
      <title>subsectioning the data</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/subsectioning-the-data/m-p/47016#M12577</link>
      <description>Hello,&lt;BR /&gt;
&lt;BR /&gt;
I have two related problems.&lt;BR /&gt;
&lt;BR /&gt;
1) I have a data set with 100 observation I only need the first 15 of them.&lt;BR /&gt;
&lt;BR /&gt;
2) next only need  5 variables of the 14 variables&lt;BR /&gt;
&lt;BR /&gt;
I used KEEP statement but my data came out with the wrong order. These are binary data and I need to keep the order the way it was in the original data. &lt;BR /&gt;
&lt;BR /&gt;
Thanks &lt;BR /&gt;
R.A.G.</description>
      <pubDate>Fri, 08 Apr 2011 15:56:18 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/subsectioning-the-data/m-p/47016#M12577</guid>
      <dc:creator>R_A_G_</dc:creator>
      <dc:date>2011-04-08T15:56:18Z</dc:date>
    </item>
    <item>
      <title>Re: subsectioning the data</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/subsectioning-the-data/m-p/47017#M12578</link>
      <description>&amp;gt; Hello,&lt;BR /&gt;
&amp;gt; &lt;BR /&gt;
&amp;gt; I have two related problems.&lt;BR /&gt;
&amp;gt; &lt;BR /&gt;
&amp;gt; 1) I have a data set with 100 observation I only need&lt;BR /&gt;
&amp;gt; the first 15 of them.&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
 on the set statement  ( or just about anywhere you have a DATA=&lt;DATASETNAME&gt; use the OBS= option&lt;BR /&gt;
&lt;BR /&gt;
Data newdata;&lt;BR /&gt;
   set olddata (obs=15);&lt;BR /&gt;
run;&lt;BR /&gt;
&lt;BR /&gt;
Also look at FIRSTOBS.&lt;BR /&gt;
&amp;gt; &lt;BR /&gt;
&amp;gt; 2) next only need  5 variables of the 14 variables&lt;BR /&gt;
&amp;gt; &lt;BR /&gt;
&amp;gt; I used KEEP statement but my data came out with the&lt;BR /&gt;
&amp;gt; wrong order. These are binary data and I need to keep&lt;BR /&gt;
&amp;gt; the order the way it was in the original data. &lt;BR /&gt;
&lt;BR /&gt;
Which order? Sort, as in row order, or columns in a dataset. If the latter I wouldn't worry about as other applications that may want the data would either link to the variable name or when you export the data then specify the column order.&lt;/DATASETNAME&gt;</description>
      <pubDate>Fri, 08 Apr 2011 20:34:25 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/subsectioning-the-data/m-p/47017#M12578</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2011-04-08T20:34:25Z</dc:date>
    </item>
    <item>
      <title>Re: subsectioning the data</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/subsectioning-the-data/m-p/47018#M12579</link>
      <description>you can use retain to reorder your variables&lt;BR /&gt;
&lt;BR /&gt;
data new (keep=name height weight);&lt;BR /&gt;
retain height weight name;&lt;BR /&gt;
set sashelp.class;&lt;BR /&gt;
run;

Message was edited by: piggy</description>
      <pubDate>Sat, 09 Apr 2011 08:10:36 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/subsectioning-the-data/m-p/47018#M12579</guid>
      <dc:creator>piggy</dc:creator>
      <dc:date>2011-04-09T08:10:36Z</dc:date>
    </item>
    <item>
      <title>Re: subsectioning the data</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/subsectioning-the-data/m-p/47019#M12580</link>
      <description>Thank you for the suggestions.&lt;BR /&gt;
&lt;BR /&gt;
 but I want to keep the same order (sort) as the original data. my problem is that once I KEEP the desired variables they get sorted by the  KEEP variables.  &lt;BR /&gt;
&lt;BR /&gt;
thanks</description>
      <pubDate>Sat, 09 Apr 2011 14:40:40 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/subsectioning-the-data/m-p/47019#M12580</guid>
      <dc:creator>R_A_G_</dc:creator>
      <dc:date>2011-04-09T14:40:40Z</dc:date>
    </item>
    <item>
      <title>Re: subsectioning the data</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/subsectioning-the-data/m-p/47020#M12581</link>
      <description>Thank you all&lt;BR /&gt;
&lt;BR /&gt;
ballardw 	suggestion worked I actually used this:&lt;BR /&gt;
&lt;BR /&gt;
data new_data (keep=A1 A2 A3);&lt;BR /&gt;
set old_data (OBS=35);&lt;BR /&gt;
run;</description>
      <pubDate>Sat, 09 Apr 2011 15:20:56 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/subsectioning-the-data/m-p/47020#M12581</guid>
      <dc:creator>R_A_G_</dc:creator>
      <dc:date>2011-04-09T15:20:56Z</dc:date>
    </item>
  </channel>
</rss>

