<?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 count how many letters and vowels in character text file? in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/how-to-count-how-many-letters-and-vowels-in-character-text-file/m-p/337666#M76716</link>
    <description>&lt;P&gt;I am just not sure how to&lt;SPAN&gt;&amp;nbsp;show the output from a single PROC PRINT that outputs the final counts and percentages only.&lt;/SPAN&gt;&lt;/P&gt;</description>
    <pubDate>Thu, 02 Mar 2017 23:29:09 GMT</pubDate>
    <dc:creator>songforu-8sdsa</dc:creator>
    <dc:date>2017-03-02T23:29:09Z</dc:date>
    <item>
      <title>how to count how many letters and vowels in character text file?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/how-to-count-how-many-letters-and-vowels-in-character-text-file/m-p/337642#M76701</link>
      <description>&lt;P&gt;&amp;nbsp;and read a character at a time, using retain funcion, calculate the precetage of vowels in total letters, all in one proc print&amp;nbsp;&lt;/P&gt;&lt;P&gt;datalines;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;A vendor was gathering data investigating why a router went down this past Monday evening - &amp;nbsp;causing a longer outage. While they were working another bug caused the router in question to reload. Since we had technicians on site, the outage was quickly resolved.&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 02 Mar 2017 22:37:19 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/how-to-count-how-many-letters-and-vowels-in-character-text-file/m-p/337642#M76701</guid>
      <dc:creator>songforu-8sdsa</dc:creator>
      <dc:date>2017-03-02T22:37:19Z</dc:date>
    </item>
    <item>
      <title>Re: how to count how many letters and vowels in character text file?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/how-to-count-how-many-letters-and-vowels-in-character-text-file/m-p/337649#M76707</link>
      <description>&lt;OL&gt;
&lt;LI&gt;RETAIN is a statement, not a function&lt;/LI&gt;
&lt;LI&gt;Must you use retain?If so, then please describe in words the sequence of steps you would perform if you were doing this manually.&lt;/LI&gt;
&lt;/OL&gt;</description>
      <pubDate>Thu, 02 Mar 2017 22:47:40 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/how-to-count-how-many-letters-and-vowels-in-character-text-file/m-p/337649#M76707</guid>
      <dc:creator>mkeintz</dc:creator>
      <dc:date>2017-03-02T22:47:40Z</dc:date>
    </item>
    <item>
      <title>Re: how to count how many letters and vowels in character text file?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/how-to-count-how-many-letters-and-vowels-in-character-text-file/m-p/337650#M76708</link>
      <description>&lt;P&gt;Please clarify your questions.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Functions that could help:&lt;/P&gt;
&lt;P&gt;CHAR, LENGTH, &amp;nbsp;and COMPRESS&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;One quick trick may be to compress out all the spaces, count the number of characters via LENGTH, compress out the vowels and then count the LENGTH again. Then it's some basic math from there &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 02 Mar 2017 22:51:38 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/how-to-count-how-many-letters-and-vowels-in-character-text-file/m-p/337650#M76708</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2017-03-02T22:51:38Z</dc:date>
    </item>
    <item>
      <title>Re: how to count how many letters and vowels in character text file?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/how-to-count-how-many-letters-and-vowels-in-character-text-file/m-p/337651#M76709</link>
      <description>&lt;P&gt;not necessarily using retain, it's just a option. as long as I can know how many letters, vowels and ratio of those two in a character string.&lt;/P&gt;&lt;P&gt;Thank you&lt;/P&gt;</description>
      <pubDate>Thu, 02 Mar 2017 22:51:53 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/how-to-count-how-many-letters-and-vowels-in-character-text-file/m-p/337651#M76709</guid>
      <dc:creator>songforu-8sdsa</dc:creator>
      <dc:date>2017-03-02T22:51:53Z</dc:date>
    </item>
    <item>
      <title>Re: how to count how many letters and vowels in character text file?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/how-to-count-how-many-letters-and-vowels-in-character-text-file/m-p/337652#M76710</link>
      <description>&lt;P&gt;Then use the functions that Reeza identifies.&lt;/P&gt;</description>
      <pubDate>Thu, 02 Mar 2017 22:53:08 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/how-to-count-how-many-letters-and-vowels-in-character-text-file/m-p/337652#M76710</guid>
      <dc:creator>mkeintz</dc:creator>
      <dc:date>2017-03-02T22:53:08Z</dc:date>
    </item>
    <item>
      <title>Re: how to count how many letters and vowels in character text file?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/how-to-count-how-many-letters-and-vowels-in-character-text-file/m-p/337654#M76711</link>
      <description>&lt;P&gt;can you give me a exaple using the the string that listed?&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;"A vendor was gathering data investigating why a router went down this past Monday evening - &amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;causing a longer outage. &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;While they were working another bug caused the router in question to reload. &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Since we had technicians on site, the outage was quickly resolved. "&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 02 Mar 2017 22:55:20 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/how-to-count-how-many-letters-and-vowels-in-character-text-file/m-p/337654#M76711</guid>
      <dc:creator>songforu-8sdsa</dc:creator>
      <dc:date>2017-03-02T22:55:20Z</dc:date>
    </item>
    <item>
      <title>Re: how to count how many letters and vowels in character text file?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/how-to-count-how-many-letters-and-vowels-in-character-text-file/m-p/337662#M76714</link>
      <description>&lt;P&gt;I just want to know how many letters and vowels in a character string and the precentage of vowels in total letters in details, how to code it&lt;/P&gt;&lt;P&gt;Thanks.&lt;/P&gt;</description>
      <pubDate>Thu, 02 Mar 2017 23:05:55 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/how-to-count-how-many-letters-and-vowels-in-character-text-file/m-p/337662#M76714</guid>
      <dc:creator>songforu-8sdsa</dc:creator>
      <dc:date>2017-03-02T23:05:55Z</dc:date>
    </item>
    <item>
      <title>Re: how to count how many letters and vowels in character text file?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/how-to-count-how-many-letters-and-vowels-in-character-text-file/m-p/337664#M76715</link>
      <description>&lt;P&gt;I pretty much outlined the steps, is there something in particular that is unclear that you're having the issues. Applying functions to a string is a pretty straightforward task.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 02 Mar 2017 23:23:58 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/how-to-count-how-many-letters-and-vowels-in-character-text-file/m-p/337664#M76715</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2017-03-02T23:23:58Z</dc:date>
    </item>
    <item>
      <title>Re: how to count how many letters and vowels in character text file?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/how-to-count-how-many-letters-and-vowels-in-character-text-file/m-p/337666#M76716</link>
      <description>&lt;P&gt;I am just not sure how to&lt;SPAN&gt;&amp;nbsp;show the output from a single PROC PRINT that outputs the final counts and percentages only.&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 02 Mar 2017 23:29:09 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/how-to-count-how-many-letters-and-vowels-in-character-text-file/m-p/337666#M76716</guid>
      <dc:creator>songforu-8sdsa</dc:creator>
      <dc:date>2017-03-02T23:29:09Z</dc:date>
    </item>
    <item>
      <title>Re: how to count how many letters and vowels in character text file?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/how-to-count-how-many-letters-and-vowels-in-character-text-file/m-p/337668#M76717</link>
      <description>&lt;P&gt;Include only those variables in your VAR statement in proc print or use a KEEP statement to only include those variables.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If you're doing text analytics are you using SAS Enterprise Miner? It should have point and click tools for this type of analysis.&lt;/P&gt;</description>
      <pubDate>Thu, 02 Mar 2017 23:41:17 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/how-to-count-how-many-letters-and-vowels-in-character-text-file/m-p/337668#M76717</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2017-03-02T23:41:17Z</dc:date>
    </item>
    <item>
      <title>Re: how to count how many letters and vowels in character text file?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/how-to-count-how-many-letters-and-vowels-in-character-text-file/m-p/337670#M76719</link>
      <description>&lt;P&gt;Here's a start:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data have;
length random_statement $50.;
random_statement = "random text that doesn't matter";
string_no_spaces = compress(random_statement);
string_no_vowels = compress(string_no_spaces, 'aeiou', 'd');

length_full_statement = length(random_statement);
length_no_spaces = length(string_no_spaces); *note punctuation is still included - should it be?;
length_no_spaces_no_vowels = length(string_no_vowels);

run;

proc print data=have;
run;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Thu, 02 Mar 2017 23:49:03 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/how-to-count-how-many-letters-and-vowels-in-character-text-file/m-p/337670#M76719</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2017-03-02T23:49:03Z</dc:date>
    </item>
  </channel>
</rss>

