<?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: How to identify all the special character in a variable value and compress them dynamically! in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/How-to-identify-all-the-special-character-in-a-variable-value/m-p/116594#M259386</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Reeza&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks for yout time. Yes. I am aware that using compress function and options, we can do the required task.&lt;/P&gt;&lt;P&gt;But in compress, we do need to specify the special characters such as ' - _ , . &amp;amp; etc.&lt;/P&gt;&lt;P&gt;Is there any efficient of identifying all the special characters in a variable value( as I dont know for sure the entire list) - rather than specifying manually - and suppress it?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SGB&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 10 Sep 2012 14:41:02 GMT</pubDate>
    <dc:creator>SGB</dc:creator>
    <dc:date>2012-09-10T14:41:02Z</dc:date>
    <item>
      <title>How to identify all the special character in a variable value and compress them dynamically!</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-identify-all-the-special-character-in-a-variable-value/m-p/116592#M259384</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi SASperts!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am looking to identify all the special characters( I am not sure what are the special characters) in a varaible value and suppress them dynamically?!&lt;/P&gt;&lt;P&gt;I am working on a very large dataset!&lt;/P&gt;&lt;P&gt;Any inputs?!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;P&gt;SGB&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 10 Sep 2012 14:27:51 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-identify-all-the-special-character-in-a-variable-value/m-p/116592#M259384</guid>
      <dc:creator>SGB</dc:creator>
      <dc:date>2012-09-10T14:27:51Z</dc:date>
    </item>
    <item>
      <title>Re: How to identify all the special character in a variable value and compress them dynamically!</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-identify-all-the-special-character-in-a-variable-value/m-p/116593#M259385</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;What are special characters to you?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;There are options in the compress function so you can control what you keep instead of reject, that might worth be looking into. &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 10 Sep 2012 14:31:43 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-identify-all-the-special-character-in-a-variable-value/m-p/116593#M259385</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2012-09-10T14:31:43Z</dc:date>
    </item>
    <item>
      <title>Re: How to identify all the special character in a variable value and compress them dynamically!</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-identify-all-the-special-character-in-a-variable-value/m-p/116594#M259386</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Reeza&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks for yout time. Yes. I am aware that using compress function and options, we can do the required task.&lt;/P&gt;&lt;P&gt;But in compress, we do need to specify the special characters such as ' - _ , . &amp;amp; etc.&lt;/P&gt;&lt;P&gt;Is there any efficient of identifying all the special characters in a variable value( as I dont know for sure the entire list) - rather than specifying manually - and suppress it?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SGB&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 10 Sep 2012 14:41:02 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-identify-all-the-special-character-in-a-variable-value/m-p/116594#M259386</guid>
      <dc:creator>SGB</dc:creator>
      <dc:date>2012-09-10T14:41:02Z</dc:date>
    </item>
    <item>
      <title>Re: How to identify all the special character in a variable value and compress them dynamically!</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-identify-all-the-special-character-in-a-variable-value/m-p/116595#M259387</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;try:&lt;/P&gt;&lt;P&gt;var=compress(var,'','kpw');&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 10 Sep 2012 15:05:39 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-identify-all-the-special-character-in-a-variable-value/m-p/116595#M259387</guid>
      <dc:creator>Linlin</dc:creator>
      <dc:date>2012-09-10T15:05:39Z</dc:date>
    </item>
    <item>
      <title>Re: How to identify all the special character in a variable value and compress them dynamically!</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-identify-all-the-special-character-in-a-variable-value/m-p/116596#M259388</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;No you don't need to specify each one.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Look at the modifiers in the documentation, you can specify all punctuation marks with the 'p' modifier for example and 'k' to keep all the punctuation instead of remove it.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A class="active_link" href="http://support.sas.com/documentation/cdl/en/lrdict/64316/HTML/default/viewer.htm#a000212246.htm" title="http://support.sas.com/documentation/cdl/en/lrdict/64316/HTML/default/viewer.htm#a000212246.htm"&gt;http://support.sas.com/documentation/cdl/en/lrdict/64316/HTML/default/viewer.htm#a000212246.htm&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;'kn' might be what you want&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 10 Sep 2012 15:27:48 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-identify-all-the-special-character-in-a-variable-value/m-p/116596#M259388</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2012-09-10T15:27:48Z</dc:date>
    </item>
    <item>
      <title>Re: How to identify all the special character in a variable value and compress them dynamically!</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-identify-all-the-special-character-in-a-variable-value/m-p/116597#M259389</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You don't specify which platform you are working on - it makes a difference whether you are running in ASCII or EBCDIC.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;We had a similar problem -&amp;nbsp; I had to deconstruct the text of the source file in individual characters and then run a PROC FREQ on them to identify each unique character in the data file.&amp;nbsp; From this I could select the characters I wanted to translate into other characters (blanks in this case).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If there are too many to do individually, or the file is just to big, you can try to identify the hex representation of the characters you want to keep - they usually run in a range such as '41'x through '5A'x represent uppercase A through Z.&amp;nbsp; You can code to exclude any character &amp;lt; 'A' or &amp;gt; 'Z' or use the hex value.&amp;nbsp; It just takes time to make sure you identify all the characters you need to keep.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;ASCII and EBCDIC characters have different hex values so any hex selections you do would be different as well.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 10 Sep 2012 17:07:31 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-identify-all-the-special-character-in-a-variable-value/m-p/116597#M259389</guid>
      <dc:creator>OS2Rules</dc:creator>
      <dc:date>2012-09-10T17:07:31Z</dc:date>
    </item>
    <item>
      <title>Re: How to identify all the special character in a variable value and compress them dynamically!</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-identify-all-the-special-character-in-a-variable-value/m-p/494729#M259390</link>
      <description>&lt;P&gt;var=compress(var_name,' ',' p');&lt;/P&gt;</description>
      <pubDate>Wed, 12 Sep 2018 06:51:54 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-identify-all-the-special-character-in-a-variable-value/m-p/494729#M259390</guid>
      <dc:creator>shivaraj</dc:creator>
      <dc:date>2018-09-12T06:51:54Z</dc:date>
    </item>
  </channel>
</rss>

