<?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 record with ASCII character in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Filtering-record-with-ASCII-character/m-p/622946#M183309</link>
    <description>&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Trying to load in data via INFILE and then create a new logical column. However, if my data contains ASCII characters (ex. "&amp;gt;", "-") I'm trying to filter on, I don't think SAS is reading it. For example,&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;dataset =&lt;/P&gt;&lt;P&gt;(Toyota, 35000, &amp;gt;12)&lt;/P&gt;&lt;P&gt;(Toyota, 40000, 12)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data car;
infile 'file path.csv'
input Car $ Miles Group $;&amp;nbsp;
if Group = &amp;gt;12 then NewColumn = "a";
if Group = 12 then NewColumn "b";
run;

&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;Expectation:&lt;/P&gt;&lt;P&gt;(Toyota, 35000, &amp;gt;12, a)&lt;/P&gt;&lt;P&gt;(Toyota, 40000, 12, b)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Results:&lt;/P&gt;&lt;P&gt;(Toyota, 35000, &amp;gt;12, )&lt;/P&gt;&lt;P&gt;(Toyota, 40000, 12, a)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Can someone help explain this, been reading on character comparisons but not much describes how to handle these operations... Thanks!&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Fri, 07 Feb 2020 06:26:51 GMT</pubDate>
    <dc:creator>chee154</dc:creator>
    <dc:date>2020-02-07T06:26:51Z</dc:date>
    <item>
      <title>Filtering record with ASCII character</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Filtering-record-with-ASCII-character/m-p/622946#M183309</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Trying to load in data via INFILE and then create a new logical column. However, if my data contains ASCII characters (ex. "&amp;gt;", "-") I'm trying to filter on, I don't think SAS is reading it. For example,&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;dataset =&lt;/P&gt;&lt;P&gt;(Toyota, 35000, &amp;gt;12)&lt;/P&gt;&lt;P&gt;(Toyota, 40000, 12)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data car;
infile 'file path.csv'
input Car $ Miles Group $;&amp;nbsp;
if Group = &amp;gt;12 then NewColumn = "a";
if Group = 12 then NewColumn "b";
run;

&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;Expectation:&lt;/P&gt;&lt;P&gt;(Toyota, 35000, &amp;gt;12, a)&lt;/P&gt;&lt;P&gt;(Toyota, 40000, 12, b)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Results:&lt;/P&gt;&lt;P&gt;(Toyota, 35000, &amp;gt;12, )&lt;/P&gt;&lt;P&gt;(Toyota, 40000, 12, a)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Can someone help explain this, been reading on character comparisons but not much describes how to handle these operations... Thanks!&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 07 Feb 2020 06:26:51 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Filtering-record-with-ASCII-character/m-p/622946#M183309</guid>
      <dc:creator>chee154</dc:creator>
      <dc:date>2020-02-07T06:26:51Z</dc:date>
    </item>
    <item>
      <title>Re: Filtering record with ASCII character</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Filtering-record-with-ASCII-character/m-p/622971#M183310</link>
      <description>&lt;P&gt;When comparing strings you have to enclose values in quotes. Try:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;if Group = "&amp;gt;12" then NewColumn = "a";
if Group = "12" then NewColumn "b";&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Fri, 07 Feb 2020 08:07:23 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Filtering-record-with-ASCII-character/m-p/622971#M183310</guid>
      <dc:creator>andreas_lds</dc:creator>
      <dc:date>2020-02-07T08:07:23Z</dc:date>
    </item>
    <item>
      <title>Re: Filtering record with ASCII character</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Filtering-record-with-ASCII-character/m-p/622989#M183311</link>
      <description>&lt;P&gt;Read the log. It will point you to the issue noted by &lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/15475"&gt;@andreas_lds&lt;/a&gt;.&lt;/P&gt;</description>
      <pubDate>Fri, 07 Feb 2020 09:55:34 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Filtering-record-with-ASCII-character/m-p/622989#M183311</guid>
      <dc:creator>Kurt_Bremser</dc:creator>
      <dc:date>2020-02-07T09:55:34Z</dc:date>
    </item>
    <item>
      <title>Re: Filtering record with ASCII character</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Filtering-record-with-ASCII-character/m-p/622991#M183312</link>
      <description>&lt;P&gt;I moved the question to the Programming community.&lt;/P&gt;</description>
      <pubDate>Fri, 07 Feb 2020 09:57:15 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Filtering-record-with-ASCII-character/m-p/622991#M183312</guid>
      <dc:creator>Kurt_Bremser</dc:creator>
      <dc:date>2020-02-07T09:57:15Z</dc:date>
    </item>
  </channel>
</rss>

