<?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: Filter data in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Filter-data/m-p/218732#M40318</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;The trick is to get your data properly sorted, &lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;STRONG style="color: navy; background: white; font-family: 'Courier New';"&gt;data&lt;/STRONG&gt;&lt;SPAN style="font-family: 'Courier New'; color: black; background: white;"&gt; have;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;SPAN style="font-family: 'Courier New'; color: blue; background: white;"&gt;input&lt;/SPAN&gt; &lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;SPAN style="font-family: 'Courier New'; color: black; background: white;"&gt;Year ISIN $ Name $ cc $; &lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;SPAN style="font-family: 'Courier New'; color: blue; background: white;"&gt;cards&lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; color: black; background: white;"&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;SPAN style="font-family: 'Courier New'; color: black; background: #FFFFC0;"&gt;2000 Uk123 ABC C1 &lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;SPAN style="font-family: 'Courier New'; color: black; background: #FFFFC0;"&gt;2000 Uk123 ABC C* &lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;SPAN style="font-family: 'Courier New'; color: black; background: #FFFFC0;"&gt;2000 Uk123 ABC U1 &lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;SPAN style="font-family: 'Courier New'; color: black; background: #FFFFC0;"&gt;2001 Uk123 ABC C2 &lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;SPAN style="font-family: 'Courier New'; color: black; background: #FFFFC0;"&gt;2001 Uk123 ABC U1 &lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;SPAN style="font-family: 'Courier New'; color: black; background: #FFFFC0;"&gt;2001 UK345 DEF U1 &lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;SPAN style="font-family: 'Courier New'; color: black; background: #FFFFC0;"&gt;2001 UK345 DEF C* &lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;SPAN style="font-family: 'Courier New'; color: black; background: #FFFFC0;"&gt;2002 UK345 DEF U* &lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;SPAN style="font-family: 'Courier New'; color: black; background: white;"&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;STRONG style="color: navy; background: white; font-family: 'Courier New';"&gt;run&lt;/STRONG&gt;&lt;SPAN style="font-family: 'Courier New'; color: black; background: white;"&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="color: navy; background: white; font-family: 'Courier New';"&gt;PROC&lt;/STRONG&gt; &lt;STRONG style="color: navy; background: white; font-family: 'Courier New';"&gt;SQL&lt;/STRONG&gt;&lt;SPAN style="font-family: 'Courier New'; color: black; background: white;"&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;SPAN style="font-family: 'Courier New'; color: blue; background: white;"&gt;CREATE&lt;/SPAN&gt; &lt;SPAN style="font-family: 'Courier New'; color: blue; background: white;"&gt;TABLE&lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; color: black; background: white;"&gt; HAVE2 &lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; color: blue; background: white;"&gt;AS&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;SPAN style="font-family: 'Courier New'; color: blue; background: white;"&gt;SELECT&lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; color: black; background: white;"&gt; * &lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; color: blue; background: white;"&gt;FROM&lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; color: black; background: white;"&gt; HAVE&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;SPAN style="font-family: 'Courier New'; color: blue; background: white;"&gt;ORDER&lt;/SPAN&gt; &lt;SPAN style="font-family: 'Courier New'; color: blue; background: white;"&gt;BY&lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; color: black; background: white;"&gt; YEAR, NAME, SUBSTR(CC,&lt;/SPAN&gt;&lt;STRONG style="color: teal; background: white; font-family: 'Courier New';"&gt;1&lt;/STRONG&gt;&lt;SPAN style="font-family: 'Courier New'; color: black; background: white;"&gt;,&lt;/SPAN&gt;&lt;STRONG style="color: teal; background: white; font-family: 'Courier New';"&gt;1&lt;/STRONG&gt;&lt;SPAN style="font-family: 'Courier New'; color: black; background: white;"&gt;), SUBSTR(CC,&lt;/SPAN&gt;&lt;STRONG style="color: teal; background: white; font-family: 'Courier New';"&gt;2&lt;/STRONG&gt;&lt;SPAN style="font-family: 'Courier New'; color: black; background: white;"&gt;,&lt;/SPAN&gt;&lt;STRONG style="color: teal; background: white; font-family: 'Courier New';"&gt;1&lt;/STRONG&gt;&lt;SPAN style="font-family: 'Courier New'; color: black; background: white;"&gt;) &lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; color: blue; background: white;"&gt;DESC&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;SPAN style="font-family: 'Courier New'; color: black; background: white;"&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;STRONG style="color: navy; background: white; font-family: 'Courier New';"&gt;QUIT&lt;/STRONG&gt;&lt;SPAN style="font-family: 'Courier New'; color: black; background: white;"&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;STRONG style="color: navy; background: white; font-family: 'Courier New';"&gt;DATA&lt;/STRONG&gt;&lt;SPAN style="font-family: 'Courier New'; color: black; background: white;"&gt; WANT;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;SPAN style="font-family: 'Courier New'; color: blue; background: white;"&gt;SET&lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; color: black; background: white;"&gt; HAVE2;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;SPAN style="font-family: 'Courier New'; color: blue; background: white;"&gt;BY&lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; color: black; background: white;"&gt; YEAR NAME;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;SPAN style="font-family: 'Courier New'; color: blue; background: white;"&gt;IF&lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; color: black; background: white;"&gt; FIRST.NAME;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="color: navy; background: white; font-family: 'Courier New';"&gt;RUN&lt;/STRONG&gt;&lt;SPAN style="font-family: 'Courier New'; color: black; background: white;"&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;SPAN style="font-family: 'Courier New'; color: black; background: white;"&gt; &lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;SPAN style="font-family: 'Courier New'; color: black; background: white;"&gt; &lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;STRONG style="color: navy; background: white; font-family: 'Courier New';"&gt;&lt;BR /&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 26 May 2015 14:01:18 GMT</pubDate>
    <dc:creator>Haikuo</dc:creator>
    <dc:date>2015-05-26T14:01:18Z</dc:date>
    <item>
      <title>Filter data</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Filter-data/m-p/218727#M40313</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P style="font-size: 13.3333330154419px;"&gt;Hi, I am new to SAS and would like some help in filtering this set of data from bankscope which has a problem with duplications. There are instances where a certain bank in a certain year has 3 rows of financial data, hence there is a need to remove/delete duplicates according to the following priority of filtering - C1/C2, C*, U1/U2, U*. From table 1 to table 2.&lt;/P&gt;&lt;P style="font-size: 13.3333330154419px;"&gt;&lt;/P&gt;&lt;P style="font-size: 13.3333330154419px;"&gt;Table 1&lt;/P&gt;&lt;TABLE border="1" jive-data-cell="{&amp;quot;color&amp;quot;:&amp;quot;#575757&amp;quot;,&amp;quot;textAlign&amp;quot;:&amp;quot;left&amp;quot;,&amp;quot;padding&amp;quot;:&amp;quot;NaN&amp;quot;,&amp;quot;backgroundColor&amp;quot;:&amp;quot;transparent&amp;quot;,&amp;quot;fontFamily&amp;quot;:&amp;quot;arial,helvetica,sans-serif&amp;quot;}" jive-data-header="{&amp;quot;color&amp;quot;:&amp;quot;#FFFFFF&amp;quot;,&amp;quot;backgroundColor&amp;quot;:&amp;quot;#6690BC&amp;quot;,&amp;quot;textAlign&amp;quot;:&amp;quot;center&amp;quot;,&amp;quot;padding&amp;quot;:&amp;quot;2&amp;quot;}" style="font-size: 13.3333330154419px; border: 1px solid #000000; width: 230px;"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD style="color: #575757; text-align: left; padding: 0px; font-family: arial, helvetica, sans-serif; background-color: transparent;"&gt;Year&lt;/TD&gt;&lt;TD style="color: #575757; text-align: left; padding: 0px; font-family: arial, helvetica, sans-serif; background-color: transparent;"&gt;ISIN&lt;/TD&gt;&lt;TD style="color: #575757; text-align: left; padding: 0px; font-family: arial, helvetica, sans-serif; background-color: transparent;"&gt;Name&lt;/TD&gt;&lt;TD style="color: #575757; text-align: left; padding: 0px; font-family: arial, helvetica, sans-serif; background-color: transparent;"&gt;Consolidation code&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD style="color: #575757; text-align: left; padding: 0px; font-family: arial, helvetica, sans-serif; background-color: transparent;"&gt;2000&lt;/TD&gt;&lt;TD style="color: #575757; text-align: left; padding: 0px; font-family: arial, helvetica, sans-serif; background-color: transparent;"&gt;Uk123&lt;/TD&gt;&lt;TD style="color: #575757; text-align: left; padding: 0px; font-family: arial, helvetica, sans-serif; background-color: transparent;"&gt;ABC&lt;/TD&gt;&lt;TD style="color: #575757; text-align: left; padding: 0px; font-family: arial, helvetica, sans-serif; background-color: transparent;"&gt;C1&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD style="color: #575757; text-align: left; padding: 0px; font-family: arial, helvetica, sans-serif; background-color: transparent;"&gt;2000&lt;/TD&gt;&lt;TD style="color: #575757; text-align: left; padding: 0px; font-family: arial, helvetica, sans-serif; background-color: transparent;"&gt;Uk123&lt;/TD&gt;&lt;TD style="color: #575757; text-align: left; padding: 0px; font-family: arial, helvetica, sans-serif; background-color: transparent;"&gt;ABC&lt;/TD&gt;&lt;TD style="color: #575757; text-align: left; padding: 0px; font-family: arial, helvetica, sans-serif; background-color: transparent;"&gt;C*&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD style="color: #575757; text-align: left; padding: 0px; font-family: arial, helvetica, sans-serif; background-color: transparent;"&gt;2000&lt;/TD&gt;&lt;TD style="color: #575757; text-align: left; padding: 0px; font-family: arial, helvetica, sans-serif; background-color: transparent;"&gt;Uk123&lt;/TD&gt;&lt;TD style="color: #575757; text-align: left; padding: 0px; font-family: arial, helvetica, sans-serif; background-color: transparent;"&gt;ABC&lt;/TD&gt;&lt;TD style="color: #575757; text-align: left; padding: 0px; font-family: arial, helvetica, sans-serif; background-color: transparent;"&gt;U1&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD style="color: #575757; text-align: left; padding: 0px; font-family: arial, helvetica, sans-serif; background-color: transparent;"&gt;2001&lt;/TD&gt;&lt;TD style="color: #575757; text-align: left; padding: 0px; font-family: arial, helvetica, sans-serif; background-color: transparent;"&gt;Uk123&lt;/TD&gt;&lt;TD style="color: #575757; text-align: left; padding: 0px; font-family: arial, helvetica, sans-serif; background-color: transparent;"&gt;ABC&lt;/TD&gt;&lt;TD style="color: #575757; text-align: left; padding: 0px; font-family: arial, helvetica, sans-serif; background-color: transparent;"&gt;C2&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD style="color: #575757; text-align: left; padding: 0px; font-family: arial, helvetica, sans-serif; background-color: transparent;"&gt;2001&lt;/TD&gt;&lt;TD style="color: #575757; text-align: left; padding: 0px; font-family: arial, helvetica, sans-serif; background-color: transparent;"&gt;Uk123&lt;/TD&gt;&lt;TD style="color: #575757; text-align: left; padding: 0px; font-family: arial, helvetica, sans-serif; background-color: transparent;"&gt;ABC&lt;/TD&gt;&lt;TD style="color: #575757; text-align: left; padding: 0px; font-family: arial, helvetica, sans-serif; background-color: transparent;"&gt;U1&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD style="color: #575757; text-align: left; padding: 0px; font-family: arial, helvetica, sans-serif; background-color: transparent;"&gt;2001&lt;/TD&gt;&lt;TD style="color: #575757; text-align: left; padding: 0px; font-family: arial, helvetica, sans-serif; background-color: transparent;"&gt;UK345&lt;/TD&gt;&lt;TD style="color: #575757; text-align: left; padding: 0px; font-family: arial, helvetica, sans-serif; background-color: transparent;"&gt;DEF&lt;/TD&gt;&lt;TD style="color: #575757; text-align: left; padding: 0px; font-family: arial, helvetica, sans-serif; background-color: transparent;"&gt;U1&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD style="color: #575757; text-align: left; padding: 0px; font-family: arial, helvetica, sans-serif; background-color: transparent;"&gt;2001&lt;/TD&gt;&lt;TD style="color: #575757; text-align: left; padding: 0px; font-family: arial, helvetica, sans-serif; background-color: transparent;"&gt;UK345&lt;/TD&gt;&lt;TD style="color: #575757; text-align: left; padding: 0px; font-family: arial, helvetica, sans-serif; background-color: transparent;"&gt;DEF&lt;/TD&gt;&lt;TD style="color: #575757; text-align: left; padding: 0px; font-family: arial, helvetica, sans-serif; background-color: transparent;"&gt;C*&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD style="color: #575757; text-align: left; padding: 0px; font-family: arial, helvetica, sans-serif; background-color: transparent;"&gt;2002&lt;/TD&gt;&lt;TD style="color: #575757; text-align: left; padding: 0px; font-family: arial, helvetica, sans-serif; background-color: transparent;"&gt;UK345&lt;/TD&gt;&lt;TD style="color: #575757; text-align: left; padding: 0px; font-family: arial, helvetica, sans-serif; background-color: transparent;"&gt;DEF&lt;/TD&gt;&lt;TD style="color: #575757; text-align: left; padding: 0px; font-family: arial, helvetica, sans-serif; background-color: transparent;"&gt;U*&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P style="font-size: 13.3333330154419px;"&gt;Table 2&lt;/P&gt;&lt;TABLE border="1" jive-data-cell="{&amp;quot;color&amp;quot;:&amp;quot;#575757&amp;quot;,&amp;quot;textAlign&amp;quot;:&amp;quot;left&amp;quot;,&amp;quot;padding&amp;quot;:&amp;quot;NaN&amp;quot;,&amp;quot;backgroundColor&amp;quot;:&amp;quot;transparent&amp;quot;,&amp;quot;fontFamily&amp;quot;:&amp;quot;arial,helvetica,sans-serif&amp;quot;}" jive-data-header="{&amp;quot;color&amp;quot;:&amp;quot;#FFFFFF&amp;quot;,&amp;quot;backgroundColor&amp;quot;:&amp;quot;#6690BC&amp;quot;,&amp;quot;textAlign&amp;quot;:&amp;quot;center&amp;quot;,&amp;quot;padding&amp;quot;:&amp;quot;2&amp;quot;}" style="font-size: 13.3333330154419px; border: 1px solid #000000; width: 230px;"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD style="color: #575757; text-align: left; padding: 0px; font-family: arial, helvetica, sans-serif; background-color: transparent;"&gt;Year&lt;/TD&gt;&lt;TD style="color: #575757; text-align: left; padding: 0px; font-family: arial, helvetica, sans-serif; background-color: transparent;"&gt;ISIN&lt;/TD&gt;&lt;TD style="color: #575757; text-align: left; padding: 0px; font-family: arial, helvetica, sans-serif; background-color: transparent;"&gt;Name&lt;/TD&gt;&lt;TD style="color: #575757; text-align: left; padding: 0px; font-family: arial, helvetica, sans-serif; background-color: transparent;"&gt;Consolidation code&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD style="color: #575757; text-align: left; padding: 0px; font-family: arial, helvetica, sans-serif; background-color: transparent;"&gt;2000&lt;/TD&gt;&lt;TD style="color: #575757; text-align: left; padding: 0px; font-family: arial, helvetica, sans-serif; background-color: transparent;"&gt;Uk123&lt;/TD&gt;&lt;TD style="color: #575757; text-align: left; padding: 0px; font-family: arial, helvetica, sans-serif; background-color: transparent;"&gt;ABC&lt;/TD&gt;&lt;TD style="color: #575757; text-align: left; padding: 0px; font-family: arial, helvetica, sans-serif; background-color: transparent;"&gt;C1&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD style="color: #575757; text-align: left; padding: 0px; font-family: arial, helvetica, sans-serif; background-color: transparent;"&gt;2001&lt;/TD&gt;&lt;TD style="color: #575757; text-align: left; padding: 0px; font-family: arial, helvetica, sans-serif; background-color: transparent;"&gt;Uk123&lt;/TD&gt;&lt;TD style="color: #575757; text-align: left; padding: 0px; font-family: arial, helvetica, sans-serif; background-color: transparent;"&gt;ABC&lt;/TD&gt;&lt;TD style="color: #575757; text-align: left; padding: 0px; font-family: arial, helvetica, sans-serif; background-color: transparent;"&gt;C2&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD style="color: #575757; text-align: left; padding: 0px; font-family: arial, helvetica, sans-serif; background-color: transparent;"&gt;2001&lt;/TD&gt;&lt;TD style="color: #575757; text-align: left; padding: 0px; font-family: arial, helvetica, sans-serif; background-color: transparent;"&gt;UK345&lt;/TD&gt;&lt;TD style="color: #575757; text-align: left; padding: 0px; font-family: arial, helvetica, sans-serif; background-color: transparent;"&gt;DEF&lt;/TD&gt;&lt;TD style="color: #575757; text-align: left; padding: 0px; font-family: arial, helvetica, sans-serif; background-color: transparent;"&gt;C*&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 26 May 2015 00:31:21 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Filter-data/m-p/218727#M40313</guid>
      <dc:creator>danielhu</dc:creator>
      <dc:date>2015-05-26T00:31:21Z</dc:date>
    </item>
    <item>
      <title>Re: Filter data</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Filter-data/m-p/218728#M40314</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Create a look-up table which maps your codes to priority order.&lt;/P&gt;&lt;P&gt;Apply the order to your original data (format, join, etc)&lt;/P&gt;&lt;P&gt;Sort on year, bank and priority&lt;/P&gt;&lt;P&gt;Proc sort nodupkey, by year bank.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 26 May 2015 06:46:27 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Filter-data/m-p/218728#M40314</guid>
      <dc:creator>LinusH</dc:creator>
      <dc:date>2015-05-26T06:46:27Z</dc:date>
    </item>
    <item>
      <title>Re: Filter data</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Filter-data/m-p/218729#M40315</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Linus, thanks for your help. But I am really new at this, do you mind sharing with me how do you code them?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 26 May 2015 07:12:07 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Filter-data/m-p/218729#M40315</guid>
      <dc:creator>danielhu</dc:creator>
      <dc:date>2015-05-26T07:12:07Z</dc:date>
    </item>
    <item>
      <title>Re: Filter data</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Filter-data/m-p/218730#M40316</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;BR /&gt;data have;&lt;BR /&gt;input &lt;BR /&gt;Year ISIN $ Name $ cc $; &lt;BR /&gt;cards;&lt;BR /&gt;2000 Uk123 ABC C1 &lt;BR /&gt;2000 Uk123 ABC C* &lt;BR /&gt;2000 Uk123 ABC U1 &lt;BR /&gt;2001 Uk123 ABC C2 &lt;BR /&gt;2001 Uk123 ABC U1 &lt;BR /&gt;2001 UK345 DEF U1 &lt;BR /&gt;2001 UK345 DEF C* &lt;BR /&gt;2002 UK345 DEF U* &lt;BR /&gt;;&lt;BR /&gt;proc print;&lt;BR /&gt;run;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;data order;&lt;BR /&gt;input cc $ rank;&lt;BR /&gt;cards;&lt;BR /&gt;C1 1&lt;BR /&gt;C2 1&lt;BR /&gt;C* 2&lt;BR /&gt;U1 3&lt;BR /&gt;U2 3&lt;BR /&gt;U* 4&lt;BR /&gt;;&lt;BR /&gt;proc print;&lt;BR /&gt;run;&lt;/P&gt;&lt;P&gt;proc sort data=have;by cc;run;&lt;BR /&gt;proc sort data=order;by cc;run;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;data have2;&lt;BR /&gt;merge have (in=a) order;&lt;BR /&gt;by cc;&lt;BR /&gt;if a;&lt;BR /&gt;run;&lt;BR /&gt;proc print;&lt;BR /&gt;run;&lt;/P&gt;&lt;P&gt;proc sort data=have2; by year isin name rank;run;&lt;BR /&gt;proc print data=have2;run;&lt;/P&gt;&lt;P&gt;proc sort data=have2 out=have3;by isin year rank;run;&lt;BR /&gt;proc print data=have3;&lt;BR /&gt;run;&lt;/P&gt;&lt;P&gt;data want;&lt;BR /&gt;set have3;&lt;BR /&gt;by isin year;&lt;BR /&gt;if first.isin or first.year;&lt;BR /&gt;run;&lt;BR /&gt;proc print;&lt;BR /&gt;run;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 26 May 2015 09:24:00 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Filter-data/m-p/218730#M40316</guid>
      <dc:creator>bharathtuppad</dc:creator>
      <dc:date>2015-05-26T09:24:00Z</dc:date>
    </item>
    <item>
      <title>Re: Filter data</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Filter-data/m-p/218731#M40317</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;data have;&lt;/P&gt;&lt;P&gt;input &lt;/P&gt;&lt;P&gt;Year ISIN $ Name $ cc $; &lt;/P&gt;&lt;P&gt;cards;&lt;/P&gt;&lt;P&gt;2000 Uk123 ABC C1 &lt;/P&gt;&lt;P&gt;2000 Uk123 ABC C* &lt;/P&gt;&lt;P&gt;2000 Uk123 ABC U1 &lt;/P&gt;&lt;P&gt;2001 Uk123 ABC C2 &lt;/P&gt;&lt;P&gt;2001 Uk123 ABC U1 &lt;/P&gt;&lt;P&gt;2001 UK345 DEF U1 &lt;/P&gt;&lt;P&gt;2001 UK345 DEF C* &lt;/P&gt;&lt;P&gt;2002 UK345 DEF U* &lt;/P&gt;&lt;P&gt;;&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;P&gt;data temp;&lt;/P&gt;&lt;P&gt; set have;&lt;/P&gt;&lt;P&gt; if cc in ('C1' 'C2') then order=1;&lt;/P&gt;&lt;P&gt;&amp;nbsp; else if cc='C*' then order=2;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; else if cc in ('U1' 'U2') then order=3;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; else if cc='U*' then order=4;&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;P&gt;proc sort data=temp;by name year order;run;&lt;/P&gt;&lt;P&gt;data want;&lt;/P&gt;&lt;P&gt; set temp;&lt;/P&gt;&lt;P&gt; by name year;&lt;/P&gt;&lt;P&gt; if first.year;&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Xia Keshan&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 26 May 2015 12:32:17 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Filter-data/m-p/218731#M40317</guid>
      <dc:creator>Ksharp</dc:creator>
      <dc:date>2015-05-26T12:32:17Z</dc:date>
    </item>
    <item>
      <title>Re: Filter data</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Filter-data/m-p/218732#M40318</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;The trick is to get your data properly sorted, &lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;STRONG style="color: navy; background: white; font-family: 'Courier New';"&gt;data&lt;/STRONG&gt;&lt;SPAN style="font-family: 'Courier New'; color: black; background: white;"&gt; have;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;SPAN style="font-family: 'Courier New'; color: blue; background: white;"&gt;input&lt;/SPAN&gt; &lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;SPAN style="font-family: 'Courier New'; color: black; background: white;"&gt;Year ISIN $ Name $ cc $; &lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;SPAN style="font-family: 'Courier New'; color: blue; background: white;"&gt;cards&lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; color: black; background: white;"&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;SPAN style="font-family: 'Courier New'; color: black; background: #FFFFC0;"&gt;2000 Uk123 ABC C1 &lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;SPAN style="font-family: 'Courier New'; color: black; background: #FFFFC0;"&gt;2000 Uk123 ABC C* &lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;SPAN style="font-family: 'Courier New'; color: black; background: #FFFFC0;"&gt;2000 Uk123 ABC U1 &lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;SPAN style="font-family: 'Courier New'; color: black; background: #FFFFC0;"&gt;2001 Uk123 ABC C2 &lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;SPAN style="font-family: 'Courier New'; color: black; background: #FFFFC0;"&gt;2001 Uk123 ABC U1 &lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;SPAN style="font-family: 'Courier New'; color: black; background: #FFFFC0;"&gt;2001 UK345 DEF U1 &lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;SPAN style="font-family: 'Courier New'; color: black; background: #FFFFC0;"&gt;2001 UK345 DEF C* &lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;SPAN style="font-family: 'Courier New'; color: black; background: #FFFFC0;"&gt;2002 UK345 DEF U* &lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;SPAN style="font-family: 'Courier New'; color: black; background: white;"&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;STRONG style="color: navy; background: white; font-family: 'Courier New';"&gt;run&lt;/STRONG&gt;&lt;SPAN style="font-family: 'Courier New'; color: black; background: white;"&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="color: navy; background: white; font-family: 'Courier New';"&gt;PROC&lt;/STRONG&gt; &lt;STRONG style="color: navy; background: white; font-family: 'Courier New';"&gt;SQL&lt;/STRONG&gt;&lt;SPAN style="font-family: 'Courier New'; color: black; background: white;"&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;SPAN style="font-family: 'Courier New'; color: blue; background: white;"&gt;CREATE&lt;/SPAN&gt; &lt;SPAN style="font-family: 'Courier New'; color: blue; background: white;"&gt;TABLE&lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; color: black; background: white;"&gt; HAVE2 &lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; color: blue; background: white;"&gt;AS&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;SPAN style="font-family: 'Courier New'; color: blue; background: white;"&gt;SELECT&lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; color: black; background: white;"&gt; * &lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; color: blue; background: white;"&gt;FROM&lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; color: black; background: white;"&gt; HAVE&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;SPAN style="font-family: 'Courier New'; color: blue; background: white;"&gt;ORDER&lt;/SPAN&gt; &lt;SPAN style="font-family: 'Courier New'; color: blue; background: white;"&gt;BY&lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; color: black; background: white;"&gt; YEAR, NAME, SUBSTR(CC,&lt;/SPAN&gt;&lt;STRONG style="color: teal; background: white; font-family: 'Courier New';"&gt;1&lt;/STRONG&gt;&lt;SPAN style="font-family: 'Courier New'; color: black; background: white;"&gt;,&lt;/SPAN&gt;&lt;STRONG style="color: teal; background: white; font-family: 'Courier New';"&gt;1&lt;/STRONG&gt;&lt;SPAN style="font-family: 'Courier New'; color: black; background: white;"&gt;), SUBSTR(CC,&lt;/SPAN&gt;&lt;STRONG style="color: teal; background: white; font-family: 'Courier New';"&gt;2&lt;/STRONG&gt;&lt;SPAN style="font-family: 'Courier New'; color: black; background: white;"&gt;,&lt;/SPAN&gt;&lt;STRONG style="color: teal; background: white; font-family: 'Courier New';"&gt;1&lt;/STRONG&gt;&lt;SPAN style="font-family: 'Courier New'; color: black; background: white;"&gt;) &lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; color: blue; background: white;"&gt;DESC&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;SPAN style="font-family: 'Courier New'; color: black; background: white;"&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;STRONG style="color: navy; background: white; font-family: 'Courier New';"&gt;QUIT&lt;/STRONG&gt;&lt;SPAN style="font-family: 'Courier New'; color: black; background: white;"&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;STRONG style="color: navy; background: white; font-family: 'Courier New';"&gt;DATA&lt;/STRONG&gt;&lt;SPAN style="font-family: 'Courier New'; color: black; background: white;"&gt; WANT;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;SPAN style="font-family: 'Courier New'; color: blue; background: white;"&gt;SET&lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; color: black; background: white;"&gt; HAVE2;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;SPAN style="font-family: 'Courier New'; color: blue; background: white;"&gt;BY&lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; color: black; background: white;"&gt; YEAR NAME;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;SPAN style="font-family: 'Courier New'; color: blue; background: white;"&gt;IF&lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; color: black; background: white;"&gt; FIRST.NAME;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="color: navy; background: white; font-family: 'Courier New';"&gt;RUN&lt;/STRONG&gt;&lt;SPAN style="font-family: 'Courier New'; color: black; background: white;"&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;SPAN style="font-family: 'Courier New'; color: black; background: white;"&gt; &lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;SPAN style="font-family: 'Courier New'; color: black; background: white;"&gt; &lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;STRONG style="color: navy; background: white; font-family: 'Courier New';"&gt;&lt;BR /&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 26 May 2015 14:01:18 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Filter-data/m-p/218732#M40318</guid>
      <dc:creator>Haikuo</dc:creator>
      <dc:date>2015-05-26T14:01:18Z</dc:date>
    </item>
  </channel>
</rss>

