<?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: Looking for single symbols in the texts? in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Looking-for-single-symbols-in-the-texts/m-p/844903#M334019</link>
    <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/67134"&gt;@ybz12003&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;Still, I need to go through all the way down the whole column to look for which are included or not.&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;Which WHAT.&amp;nbsp; Please clarify what you are trying to do.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Are you trying to count how many observations have of ANY "special" characters?&amp;nbsp; Are you trying to count how many have EACH of the individual special characters?&amp;nbsp; Are you just trying to generate a list of special characters that appear anywhere?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Are you trying to subset the data?&amp;nbsp; How?&amp;nbsp; Keep the records with special characters?&amp;nbsp; Keep the records without special characters?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Are you trying to remove the special characters?&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Replace them in some way?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Thu, 17 Nov 2022 15:42:34 GMT</pubDate>
    <dc:creator>Tom</dc:creator>
    <dc:date>2022-11-17T15:42:34Z</dc:date>
    <item>
      <title>Looking for single symbols in the texts?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Looking-for-single-symbols-in-the-texts/m-p/844858#M333999</link>
      <description>&lt;P&gt;Hello,&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I have a sample dataset list below.&amp;nbsp; I'm looking to list the SINGLE symbols in my final result.&amp;nbsp; Is there a way to accomplish that?&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data Charge_Details;  
	length Charge $200; 
	infile datalines delimiter='$'; 
	input Charge;  
	datalines;                     
	HB ACETAMINOPHEN 160MG/5ML TYLEN ADULT/PED &amp;gt; 4.0$
	HB ALBUTEROL 0.83MG/ML INH SOL(P$
	HB 5%DEXTROSE/1/2NS+KCL 10MEQ/L 1$
	HB SUPERVISED COUGH &amp;amp; SUCTION - 1/2 HR$
;   

data Symbol;
	set Charge_Details;
	symbol=compress(strip(upcase(Charge)), ' ' ,'A');
run;

data Want;  
	length Symbols $200; 
	infile datalines delimiter='$'; 
	input Symbols;  
	datalines;                     
	/&amp;gt;(%+&amp;amp;-$
;   &lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Thu, 17 Nov 2022 13:58:51 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Looking-for-single-symbols-in-the-texts/m-p/844858#M333999</guid>
      <dc:creator>ybz12003</dc:creator>
      <dc:date>2022-11-17T13:58:51Z</dc:date>
    </item>
    <item>
      <title>Re: Looking for single symbols in the texts?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Looking-for-single-symbols-in-the-texts/m-p/844870#M334005</link>
      <description>&lt;P&gt;So you want a single line with all the distinct special characters from all lines in the input data, correct? &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 17 Nov 2022 14:26:21 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Looking-for-single-symbols-in-the-texts/m-p/844870#M334005</guid>
      <dc:creator>PeterClemmensen</dc:creator>
      <dc:date>2022-11-17T14:26:21Z</dc:date>
    </item>
    <item>
      <title>Re: Looking for single symbols in the texts?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Looking-for-single-symbols-in-the-texts/m-p/844874#M334007</link>
      <description>&lt;P&gt;Just an idea:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data Symbol;
  set Charge_Details;
  symbol = compress(strip(upcase(Charge)),'/&amp;gt;(%+&amp;amp;-','k');
run;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Thu, 17 Nov 2022 14:27:38 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Looking-for-single-symbols-in-the-texts/m-p/844874#M334007</guid>
      <dc:creator>Kurt_Bremser</dc:creator>
      <dc:date>2022-11-17T14:27:38Z</dc:date>
    </item>
    <item>
      <title>Re: Looking for single symbols in the texts?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Looking-for-single-symbols-in-the-texts/m-p/844885#M334012</link>
      <description>Yes</description>
      <pubDate>Thu, 17 Nov 2022 14:52:51 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Looking-for-single-symbols-in-the-texts/m-p/844885#M334012</guid>
      <dc:creator>ybz12003</dc:creator>
      <dc:date>2022-11-17T14:52:51Z</dc:date>
    </item>
    <item>
      <title>Re: Looking for single symbols in the texts?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Looking-for-single-symbols-in-the-texts/m-p/844886#M334013</link>
      <description>I have over 100 thousand lines in the actual dataset, I won't be able to review each line to define which special symbols.</description>
      <pubDate>Thu, 17 Nov 2022 14:54:00 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Looking-for-single-symbols-in-the-texts/m-p/844886#M334013</guid>
      <dc:creator>ybz12003</dc:creator>
      <dc:date>2022-11-17T14:54:00Z</dc:date>
    </item>
    <item>
      <title>Re: Looking for single symbols in the texts?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Looking-for-single-symbols-in-the-texts/m-p/844891#M334015</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/67134"&gt;@ybz12003&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;I have over 100 thousand lines in the actual dataset, I won't be able to review each line to define which special symbols.&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;You don't need to review all the lines.&lt;/P&gt;
&lt;P&gt;But you do need to have foreknowledge of either (1) all symbols that might be classified as "special", (whether they will be encountered in the data or not), or (2) all symbols that are not classified as "special".&lt;/P&gt;</description>
      <pubDate>Thu, 17 Nov 2022 15:08:02 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Looking-for-single-symbols-in-the-texts/m-p/844891#M334015</guid>
      <dc:creator>mkeintz</dc:creator>
      <dc:date>2022-11-17T15:08:02Z</dc:date>
    </item>
    <item>
      <title>Re: Looking for single symbols in the texts?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Looking-for-single-symbols-in-the-texts/m-p/844901#M334018</link>
      <description>Still, I need to go through all the way down the whole column to look for which are included or not.</description>
      <pubDate>Thu, 17 Nov 2022 15:21:46 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Looking-for-single-symbols-in-the-texts/m-p/844901#M334018</guid>
      <dc:creator>ybz12003</dc:creator>
      <dc:date>2022-11-17T15:21:46Z</dc:date>
    </item>
    <item>
      <title>Re: Looking for single symbols in the texts?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Looking-for-single-symbols-in-the-texts/m-p/844903#M334019</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/67134"&gt;@ybz12003&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;Still, I need to go through all the way down the whole column to look for which are included or not.&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;Which WHAT.&amp;nbsp; Please clarify what you are trying to do.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Are you trying to count how many observations have of ANY "special" characters?&amp;nbsp; Are you trying to count how many have EACH of the individual special characters?&amp;nbsp; Are you just trying to generate a list of special characters that appear anywhere?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Are you trying to subset the data?&amp;nbsp; How?&amp;nbsp; Keep the records with special characters?&amp;nbsp; Keep the records without special characters?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Are you trying to remove the special characters?&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Replace them in some way?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 17 Nov 2022 15:42:34 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Looking-for-single-symbols-in-the-texts/m-p/844903#M334019</guid>
      <dc:creator>Tom</dc:creator>
      <dc:date>2022-11-17T15:42:34Z</dc:date>
    </item>
    <item>
      <title>Re: Looking for single symbols in the texts?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Looking-for-single-symbols-in-the-texts/m-p/844914#M334024</link>
      <description>&lt;P&gt;So you need to do this:&lt;/P&gt;
&lt;OL&gt;
&lt;LI&gt;define all the "special" characters you are looking for&lt;/LI&gt;
&lt;LI&gt;scan each line for the characters and mark those found&lt;/LI&gt;
&lt;LI&gt;at the end of the dataset, output those that were found&lt;/LI&gt;
&lt;/OL&gt;
&lt;P&gt;I would define two temporary arrays, one with elements of length $1 which keeps your characters to look for, and another numeric array of same size initialized to 0s. In each observation, scan with FINDC, and set the corresponding element in the numeric array to 1.&lt;/P&gt;
&lt;P&gt;When through the dataset, ouput all characters which have a 1 in their corresponding numeric element.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 17 Nov 2022 16:33:31 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Looking-for-single-symbols-in-the-texts/m-p/844914#M334024</guid>
      <dc:creator>Kurt_Bremser</dc:creator>
      <dc:date>2022-11-17T16:33:31Z</dc:date>
    </item>
  </channel>
</rss>

