<?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 remove bad data from a variable in New SAS User</title>
    <link>https://communities.sas.com/t5/New-SAS-User/remove-bad-data-from-a-variable/m-p/960401#M43140</link>
    <description>&lt;P&gt;Hi I want remove a bad data from a variable . so inthis obs between nicolas and 84989 there is a small icon am trying to remove that using sas in linux environment&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I tried to do the same in sas eg using&amp;nbsp;&lt;/P&gt;
&lt;P&gt;APPLCNT_CMT_TX=compress(APPLCNT_CMT_TX,'&amp;#26;');&lt;/P&gt;
&lt;P&gt;&lt;LI-WRAPPER&gt;&lt;/LI-WRAPPER&gt;&lt;/P&gt;
&lt;P&gt;this is working but in linux environement the same is now working&amp;nbsp;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="animesh123_0-1740662700143.jpeg" style="width: 400px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/105006i8AC150CC4EDEF632/image-size/medium?v=v2&amp;amp;px=400" role="button" title="animesh123_0-1740662700143.jpeg" alt="animesh123_0-1740662700143.jpeg" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Thu, 27 Feb 2025 13:28:34 GMT</pubDate>
    <dc:creator>animesh123</dc:creator>
    <dc:date>2025-02-27T13:28:34Z</dc:date>
    <item>
      <title>remove bad data from a variable</title>
      <link>https://communities.sas.com/t5/New-SAS-User/remove-bad-data-from-a-variable/m-p/960401#M43140</link>
      <description>&lt;P&gt;Hi I want remove a bad data from a variable . so inthis obs between nicolas and 84989 there is a small icon am trying to remove that using sas in linux environment&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I tried to do the same in sas eg using&amp;nbsp;&lt;/P&gt;
&lt;P&gt;APPLCNT_CMT_TX=compress(APPLCNT_CMT_TX,'&amp;#26;');&lt;/P&gt;
&lt;P&gt;&lt;LI-WRAPPER&gt;&lt;/LI-WRAPPER&gt;&lt;/P&gt;
&lt;P&gt;this is working but in linux environement the same is now working&amp;nbsp;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="animesh123_0-1740662700143.jpeg" style="width: 400px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/105006i8AC150CC4EDEF632/image-size/medium?v=v2&amp;amp;px=400" role="button" title="animesh123_0-1740662700143.jpeg" alt="animesh123_0-1740662700143.jpeg" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 27 Feb 2025 13:28:34 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/remove-bad-data-from-a-variable/m-p/960401#M43140</guid>
      <dc:creator>animesh123</dc:creator>
      <dc:date>2025-02-27T13:28:34Z</dc:date>
    </item>
    <item>
      <title>Re: remove bad data from a variable</title>
      <link>https://communities.sas.com/t5/New-SAS-User/remove-bad-data-from-a-variable/m-p/960403#M43141</link>
      <description>&lt;P&gt;In general I find it is better to write non 7-bit ASCII strings as HEX literals in the SAS code.&amp;nbsp; That way the code works the same if you change the encoding setting you are running with.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;So LOOK at the hex codes for the character by using the $HEX format.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Then write the code using the hexcode.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;For example if that "box" is was just the hex code '0A'x (which is actually a linefeed) then you might use&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;APPLCNT_CMT_TX=compress(APPLCNT_CMT_TX,'0A'x);&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If the goal is to only keep normal characters then use the K modifier on the COMPRESS() function call to say that the list of characters are those that should be KEPT instead the default action of removing the listed characters.&amp;nbsp; You can use COLLATE() to generate all of the printable 7-bit ASCII characters.&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;APPLCNT_CMT_TX=compress(APPLCNT_CMT_TX,collate(32,126),'K');&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 27 Feb 2025 13:47:25 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/remove-bad-data-from-a-variable/m-p/960403#M43141</guid>
      <dc:creator>Tom</dc:creator>
      <dc:date>2025-02-27T13:47:25Z</dc:date>
    </item>
    <item>
      <title>Re: remove bad data from a variable</title>
      <link>https://communities.sas.com/t5/New-SAS-User/remove-bad-data-from-a-variable/m-p/960406#M43143</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/430763"&gt;@animesh123&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;
&lt;P&gt;Hi I want remove a bad data from a variable . so inthis obs between nicolas and 84989 there is a small icon am trying to remove that using sas in linux environment&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I tried to do the same in sas eg using&amp;nbsp;&lt;/P&gt;
&lt;P&gt;APPLCNT_CMT_TX=compress(APPLCNT_CMT_TX,'&amp;#26;');&lt;/P&gt;
&lt;P&gt;&lt;LI-WRAPPER&gt;&lt;/LI-WRAPPER&gt;&lt;/P&gt;
&lt;P&gt;this is working but in linux environement the same is now working&amp;nbsp;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="animesh123_0-1740662700143.jpeg" style="width: 400px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/105006i8AC150CC4EDEF632/image-size/medium?v=v2&amp;amp;px=400" role="button" title="animesh123_0-1740662700143.jpeg" alt="animesh123_0-1740662700143.jpeg" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;is this a one-time need to remove just one character from this string? Or in a larger data set do possibly other characters appear depending on the string that you want to remove?&lt;/P&gt;</description>
      <pubDate>Thu, 27 Feb 2025 13:49:10 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/remove-bad-data-from-a-variable/m-p/960406#M43143</guid>
      <dc:creator>PaigeMiller</dc:creator>
      <dc:date>2025-02-27T13:49:10Z</dc:date>
    </item>
    <item>
      <title>Re: remove bad data from a variable</title>
      <link>https://communities.sas.com/t5/New-SAS-User/remove-bad-data-from-a-variable/m-p/960407#M43144</link>
      <description>APPLCNT_CMT_TX=compress(APPLCNT_CMT_TX,'&amp;#26;');&lt;BR /&gt;want to remove only this &amp;#26;</description>
      <pubDate>Thu, 27 Feb 2025 13:55:42 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/remove-bad-data-from-a-variable/m-p/960407#M43144</guid>
      <dc:creator>animesh123</dc:creator>
      <dc:date>2025-02-27T13:55:42Z</dc:date>
    </item>
    <item>
      <title>Re: remove bad data from a variable</title>
      <link>https://communities.sas.com/t5/New-SAS-User/remove-bad-data-from-a-variable/m-p/960411#M43145</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/430763"&gt;@animesh123&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;APPLCNT_CMT_TX=compress(APPLCNT_CMT_TX,'&amp;#26;');&lt;BR /&gt;want to remove only this &amp;#26;&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;And WHAT character is that exactly?&amp;nbsp;&lt;/P&gt;
&lt;P&gt;When I try to copy and paste from your post here into SAS editor it just ends up as the '1A'x character.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Tom_1-1740666213343.png" style="width: 400px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/105008iC80384BFAD1CC4C6/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Tom_1-1740666213343.png" alt="Tom_1-1740666213343.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Which is just what SAS puts when it does not know how to transcode a character.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If that is the actual character you have then why does this forum display it as a box with an X in it when SAS and WORD display it as just an empty box?&lt;/P&gt;
&lt;P&gt;WORD Example:&amp;nbsp;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Tom_0-1740666169777.png" style="width: 400px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/105007i356196CF16B440EA/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Tom_0-1740666169777.png" alt="Tom_0-1740666169777.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 27 Feb 2025 14:24:08 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/remove-bad-data-from-a-variable/m-p/960411#M43145</guid>
      <dc:creator>Tom</dc:creator>
      <dc:date>2025-02-27T14:24:08Z</dc:date>
    </item>
  </channel>
</rss>

