<?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: empty column with only two character in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/empty-column-with-only-two-character/m-p/629716#M186290</link>
    <description>&lt;P&gt;Hi &lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/107435"&gt;@harrylui&lt;/a&gt;&lt;BR /&gt;You can use a length() function in a IF condition in a data step:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;Data want;
Set have;
If length(strip(location))=2 then location ='';
Run;
&lt;/CODE&gt;&lt;/PRE&gt;</description>
    <pubDate>Thu, 05 Mar 2020 06:57:19 GMT</pubDate>
    <dc:creator>ed_sas_member</dc:creator>
    <dc:date>2020-03-05T06:57:19Z</dc:date>
    <item>
      <title>empty column with only two character</title>
      <link>https://communities.sas.com/t5/SAS-Programming/empty-column-with-only-two-character/m-p/629715#M186289</link>
      <description>&lt;P&gt;good day,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;is there a way to empty a column with only two character?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;i want to eliminate the row only store&amp;nbsp;two character&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;for&amp;nbsp; example&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Location&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;AB&amp;nbsp;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Church&lt;/P&gt;
&lt;P&gt;company&lt;/P&gt;
&lt;P&gt;cc&lt;/P&gt;
&lt;P&gt;bb&lt;/P&gt;
&lt;P&gt;dd&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;want to empty the string AB,cc,bb,dd to nothing&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;thanks in advance&lt;/P&gt;
&lt;P&gt;harry&lt;/P&gt;</description>
      <pubDate>Thu, 05 Mar 2020 06:38:42 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/empty-column-with-only-two-character/m-p/629715#M186289</guid>
      <dc:creator>harrylui</dc:creator>
      <dc:date>2020-03-05T06:38:42Z</dc:date>
    </item>
    <item>
      <title>Re: empty column with only two character</title>
      <link>https://communities.sas.com/t5/SAS-Programming/empty-column-with-only-two-character/m-p/629716#M186290</link>
      <description>&lt;P&gt;Hi &lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/107435"&gt;@harrylui&lt;/a&gt;&lt;BR /&gt;You can use a length() function in a IF condition in a data step:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;Data want;
Set have;
If length(strip(location))=2 then location ='';
Run;
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Thu, 05 Mar 2020 06:57:19 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/empty-column-with-only-two-character/m-p/629716#M186290</guid>
      <dc:creator>ed_sas_member</dc:creator>
      <dc:date>2020-03-05T06:57:19Z</dc:date>
    </item>
    <item>
      <title>Re: empty column with only two character</title>
      <link>https://communities.sas.com/t5/SAS-Programming/empty-column-with-only-two-character/m-p/629719#M186293</link>
      <description>&lt;P&gt;The function lengthn returns the number of chars ignoring blanks at the end and returning 0, if the variable is empty/missing:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data want;
  set have;

  if lengthn(Location) = 2 then Location = " ";
run;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Thu, 05 Mar 2020 06:55:14 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/empty-column-with-only-two-character/m-p/629719#M186293</guid>
      <dc:creator>andreas_lds</dc:creator>
      <dc:date>2020-03-05T06:55:14Z</dc:date>
    </item>
    <item>
      <title>Re: empty column with only two character</title>
      <link>https://communities.sas.com/t5/SAS-Programming/empty-column-with-only-two-character/m-p/629720#M186294</link>
      <description>thank you all</description>
      <pubDate>Thu, 05 Mar 2020 06:58:53 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/empty-column-with-only-two-character/m-p/629720#M186294</guid>
      <dc:creator>harrylui</dc:creator>
      <dc:date>2020-03-05T06:58:53Z</dc:date>
    </item>
  </channel>
</rss>

