<?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 Filtering data in SAS in SAS Procedures</title>
    <link>https://communities.sas.com/t5/SAS-Procedures/Filtering-data-in-SAS/m-p/69455#M19935</link>
    <description>Hi all&lt;BR /&gt;
&lt;BR /&gt;
I am a SAS beginner.&lt;BR /&gt;
&lt;BR /&gt;
I am working with financial time series data and need to filter out data for around 3000 firms from a huge data set. I have a unique ID by which I can identify these 3000 firms but I cant use standard statements such as 'if', 'where' in the SAS code because I dont think its practical to list 3000 objects in a SAS code.&lt;BR /&gt;
&lt;BR /&gt;
Is there a way I can compare my ID variable in the main data set to the list of 3000 IDs i store as an external file? Or is there any other way of doing this? Do let me know.&lt;BR /&gt;
&lt;BR /&gt;
Ronnie</description>
    <pubDate>Fri, 04 Sep 2009 07:12:04 GMT</pubDate>
    <dc:creator>deleted_user</dc:creator>
    <dc:date>2009-09-04T07:12:04Z</dc:date>
    <item>
      <title>Filtering data in SAS</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Filtering-data-in-SAS/m-p/69455#M19935</link>
      <description>Hi all&lt;BR /&gt;
&lt;BR /&gt;
I am a SAS beginner.&lt;BR /&gt;
&lt;BR /&gt;
I am working with financial time series data and need to filter out data for around 3000 firms from a huge data set. I have a unique ID by which I can identify these 3000 firms but I cant use standard statements such as 'if', 'where' in the SAS code because I dont think its practical to list 3000 objects in a SAS code.&lt;BR /&gt;
&lt;BR /&gt;
Is there a way I can compare my ID variable in the main data set to the list of 3000 IDs i store as an external file? Or is there any other way of doing this? Do let me know.&lt;BR /&gt;
&lt;BR /&gt;
Ronnie</description>
      <pubDate>Fri, 04 Sep 2009 07:12:04 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Filtering-data-in-SAS/m-p/69455#M19935</guid>
      <dc:creator>deleted_user</dc:creator>
      <dc:date>2009-09-04T07:12:04Z</dc:date>
    </item>
    <item>
      <title>Re: Filtering data in SAS</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Filtering-data-in-SAS/m-p/69456#M19936</link>
      <description>Hi ronmama&lt;BR /&gt;
&lt;BR /&gt;
Your right about not writing 3000 if statements &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;BR /&gt;
&lt;BR /&gt;
You can load your list of firms into SAS and then use i.e Data step merge or PROC SQL. &lt;BR /&gt;
&lt;BR /&gt;
i.e have a look at this simple mock-up code&lt;BR /&gt;
[pre]&lt;BR /&gt;
data filtered;&lt;BR /&gt;
  merge timeseries(in=a)&lt;BR /&gt;
            firms(in=b);&lt;BR /&gt;
  by id;&lt;BR /&gt;
  if a and not b then delete;&lt;BR /&gt;
run;&lt;BR /&gt;
       [/pre]</description>
      <pubDate>Fri, 04 Sep 2009 08:08:23 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Filtering-data-in-SAS/m-p/69456#M19936</guid>
      <dc:creator>GertNissen</dc:creator>
      <dc:date>2009-09-04T08:08:23Z</dc:date>
    </item>
    <item>
      <title>Re: Filtering data in SAS</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Filtering-data-in-SAS/m-p/69457#M19937</link>
      <description>Hi geniz&lt;BR /&gt;
&lt;BR /&gt;
thank you very much. it works.:)&lt;BR /&gt;
&lt;BR /&gt;
Ronnie</description>
      <pubDate>Fri, 04 Sep 2009 08:36:23 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Filtering-data-in-SAS/m-p/69457#M19937</guid>
      <dc:creator>deleted_user</dc:creator>
      <dc:date>2009-09-04T08:36:23Z</dc:date>
    </item>
  </channel>
</rss>

