<?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: SAS sees the same value as 2 different values in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/SAS-sees-the-same-value-as-2-different-values/m-p/856062#M338266</link>
    <description>&lt;P&gt;Also make sure that those oval shaped characters are all the same.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Old typewriters did not have keys for one or zero as you could just use the lowercase L and uppercase o to put the same ink on the page.&lt;/P&gt;</description>
    <pubDate>Fri, 27 Jan 2023 22:09:39 GMT</pubDate>
    <dc:creator>Tom</dc:creator>
    <dc:date>2023-01-27T22:09:39Z</dc:date>
    <item>
      <title>SAS sees the same value as 2 different values</title>
      <link>https://communities.sas.com/t5/SAS-Programming/SAS-sees-the-same-value-as-2-different-values/m-p/856057#M338262</link>
      <description>&lt;P&gt;I have 2 data sets that I am trying to link by an alphanumeric variable (job code). I already found that one data set contains "non-breaking spaces" (which I didn't know exist). I am finding some of the codes still are not matching. For example, I have a code "AB000". When I do a proc freq before linking these data sets, I find two "AB000" listed. The search function in SAS results window finds both entries using "AB000". I also tried matching with "%AB000%" and using compress to account for any characters that I may not be seeing, and still getting the same result. I tried exporting the proc freq to excel and original data set to csv, and still I am not seeing a difference. Has anyone had experience with this?&lt;/P&gt;</description>
      <pubDate>Fri, 27 Jan 2023 21:52:21 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/SAS-sees-the-same-value-as-2-different-values/m-p/856057#M338262</guid>
      <dc:creator>axescot78</dc:creator>
      <dc:date>2023-01-27T21:52:21Z</dc:date>
    </item>
    <item>
      <title>Re: SAS sees the same value as 2 different values</title>
      <link>https://communities.sas.com/t5/SAS-Programming/SAS-sees-the-same-value-as-2-different-values/m-p/856060#M338264</link>
      <description>&lt;P&gt;The proc freq output is likely showing two, or more values, because of leading spaces. The table generator for output left justifies the text even if there are leading spaces.&lt;/P&gt;
&lt;P&gt;Try using the LEFT or STRIP function on the variable(s) in a data step and then see if the result changes.&lt;/P&gt;
&lt;P&gt;A brief example to demonstrate:&lt;/P&gt;
&lt;PRE&gt;data example;  
   length string $ 8;
   string='abc';output;
   string=' abc';output;
   string='   abc';output;
run;

proc freq data=example;
   tables string;
run;

data newex;
   set example;
   string=strip(string);
run;
proc freq data=newex;
   tables string;
run;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 27 Jan 2023 22:08:19 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/SAS-sees-the-same-value-as-2-different-values/m-p/856060#M338264</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2023-01-27T22:08:19Z</dc:date>
    </item>
    <item>
      <title>Re: SAS sees the same value as 2 different values</title>
      <link>https://communities.sas.com/t5/SAS-Programming/SAS-sees-the-same-value-as-2-different-values/m-p/856061#M338265</link>
      <description>&lt;P&gt;Are you looking at the output produced by ODS (such as HTML, PDF or RTF)?&amp;nbsp; If then ODS has a nasty habit of not displaying leading spaces.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Try just removing the leading spaces.&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data fix;
  set have;
  job_code = left(job_code);
run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;Otherwise try looking at the values using the $HEX format to see the actual characters in the field.&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc freq data=fix ;
  where job_code like '%ABOOO%';
  tables job_code / noprint out=counts;
run;
proc print data=counts;
  format job_code $hex14. ;
run;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Fri, 27 Jan 2023 22:04:58 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/SAS-sees-the-same-value-as-2-different-values/m-p/856061#M338265</guid>
      <dc:creator>Tom</dc:creator>
      <dc:date>2023-01-27T22:04:58Z</dc:date>
    </item>
    <item>
      <title>Re: SAS sees the same value as 2 different values</title>
      <link>https://communities.sas.com/t5/SAS-Programming/SAS-sees-the-same-value-as-2-different-values/m-p/856062#M338266</link>
      <description>&lt;P&gt;Also make sure that those oval shaped characters are all the same.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Old typewriters did not have keys for one or zero as you could just use the lowercase L and uppercase o to put the same ink on the page.&lt;/P&gt;</description>
      <pubDate>Fri, 27 Jan 2023 22:09:39 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/SAS-sees-the-same-value-as-2-different-values/m-p/856062#M338266</guid>
      <dc:creator>Tom</dc:creator>
      <dc:date>2023-01-27T22:09:39Z</dc:date>
    </item>
  </channel>
</rss>

