<?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 Creating a subset file with selected ID in SAS Procedures</title>
    <link>https://communities.sas.com/t5/SAS-Procedures/Creating-a-subset-file-with-selected-ID/m-p/167648#M43422</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I would like to subset one dataset so that my output file has only the desired ID numbers. For an example, from a file with the following ID (plus other variables) I would&lt;/P&gt;&lt;P&gt;like to have a subset file that contains only the ID = 122142, 321212, 123213, 113211, 123131, 232116. Please help.&lt;/P&gt;&lt;P&gt;Sapkota&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;ID&lt;/P&gt;&lt;P&gt;122142&lt;/P&gt;&lt;P&gt;321212&lt;/P&gt;&lt;P&gt;123213&lt;/P&gt;&lt;P&gt;113211&lt;/P&gt;&lt;P&gt;123131&lt;/P&gt;&lt;P&gt;232116&lt;/P&gt;&lt;P&gt;665454&lt;/P&gt;&lt;P&gt;465653&lt;/P&gt;&lt;P&gt;543543&lt;/P&gt;&lt;P&gt;434536&lt;/P&gt;&lt;P&gt;094345&lt;/P&gt;&lt;P&gt;098543&lt;/P&gt;&lt;P&gt;934543&lt;/P&gt;&lt;P&gt;436344&lt;/P&gt;&lt;P&gt;and so on&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 21 May 2014 16:18:45 GMT</pubDate>
    <dc:creator>Sapkota</dc:creator>
    <dc:date>2014-05-21T16:18:45Z</dc:date>
    <item>
      <title>Creating a subset file with selected ID</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Creating-a-subset-file-with-selected-ID/m-p/167648#M43422</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I would like to subset one dataset so that my output file has only the desired ID numbers. For an example, from a file with the following ID (plus other variables) I would&lt;/P&gt;&lt;P&gt;like to have a subset file that contains only the ID = 122142, 321212, 123213, 113211, 123131, 232116. Please help.&lt;/P&gt;&lt;P&gt;Sapkota&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;ID&lt;/P&gt;&lt;P&gt;122142&lt;/P&gt;&lt;P&gt;321212&lt;/P&gt;&lt;P&gt;123213&lt;/P&gt;&lt;P&gt;113211&lt;/P&gt;&lt;P&gt;123131&lt;/P&gt;&lt;P&gt;232116&lt;/P&gt;&lt;P&gt;665454&lt;/P&gt;&lt;P&gt;465653&lt;/P&gt;&lt;P&gt;543543&lt;/P&gt;&lt;P&gt;434536&lt;/P&gt;&lt;P&gt;094345&lt;/P&gt;&lt;P&gt;098543&lt;/P&gt;&lt;P&gt;934543&lt;/P&gt;&lt;P&gt;436344&lt;/P&gt;&lt;P&gt;and so on&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 21 May 2014 16:18:45 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Creating-a-subset-file-with-selected-ID/m-p/167648#M43422</guid>
      <dc:creator>Sapkota</dc:creator>
      <dc:date>2014-05-21T16:18:45Z</dc:date>
    </item>
    <item>
      <title>Re: Creating a subset file with selected ID</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Creating-a-subset-file-with-selected-ID/m-p/167649#M43423</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;BR /&gt;Try this.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;proc sql;&lt;/P&gt;&lt;P&gt;select * from have&lt;/P&gt;&lt;P&gt;where id in (122142, 321212, 123213, 113211, 123131, 232116);&lt;/P&gt;&lt;P&gt;quit;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 21 May 2014 16:23:25 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Creating-a-subset-file-with-selected-ID/m-p/167649#M43423</guid>
      <dc:creator>stat_sas</dc:creator>
      <dc:date>2014-05-21T16:23:25Z</dc:date>
    </item>
    <item>
      <title>Re: Creating a subset file with selected ID</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Creating-a-subset-file-with-selected-ID/m-p/167650#M43424</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;If you're new to SAS, the SAS tutorials on the UCLA website are a great resource.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="http://www.ats.ucla.edu/stat/sas/modules/subset.htm" title="http://www.ats.ucla.edu/stat/sas/modules/subset.htm"&gt;SAS Learning Module: Subsetting data in SAS&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="http://www.ats.ucla.edu/stat/sas/notes/managing.htm" title="http://www.ats.ucla.edu/stat/sas/notes/managing.htm"&gt;SAS Class Notes: Managing Data&lt;/A&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 21 May 2014 16:31:07 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Creating-a-subset-file-with-selected-ID/m-p/167650#M43424</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2014-05-21T16:31:07Z</dc:date>
    </item>
    <item>
      <title>Re: Creating a subset file with selected ID</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Creating-a-subset-file-with-selected-ID/m-p/167651#M43425</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;If they are character variables and not numeric you'll to quote each value:&lt;/P&gt;&lt;P&gt;in ('122142', '321212', etc)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;the commas are optional in later versions of SAS but I think help readability of&amp;nbsp; the code.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 22 May 2014 16:58:30 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Creating-a-subset-file-with-selected-ID/m-p/167651#M43425</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2014-05-22T16:58:30Z</dc:date>
    </item>
  </channel>
</rss>

