<?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: NOTALPHA() does not return 0 for a string of all alphabetic letters in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/NOTALPHA-does-not-return-0-for-a-string-of-all-alphabetic/m-p/819527#M323498</link>
    <description>Dear Reeza,&lt;BR /&gt;Thank you so much.&lt;BR /&gt;However TRIM does not work. Please see below.&lt;BR /&gt;DATA TST;&lt;BR /&gt;INPUT Seq $;&lt;BR /&gt;SeqT=TRIM(Seq);&lt;BR /&gt;Notalphap=NOTALPHA(Seq);&lt;BR /&gt;NotalphaTp=NOTALPHA(SeqT);&lt;BR /&gt;Seql=LENGTH(Seq);&lt;BR /&gt;SeqTl=LENGTH(SeqT);&lt;BR /&gt;DATALINES;&lt;BR /&gt;AbB1&lt;BR /&gt;aaaa&lt;BR /&gt;Bcc&lt;BR /&gt;Cdd&lt;BR /&gt;;&lt;BR /&gt;RUN;&lt;BR /&gt;PROC SQL;&lt;BR /&gt;SELECT Seq, SeqT, Notalphap, NotalphaTp, Seql, SeqTl&lt;BR /&gt;FROM Tst;&lt;BR /&gt;QUIT;&lt;BR /&gt;I got&lt;BR /&gt;Seq SeqT Notalphap NotalphaTp Seql SeqTl&lt;BR /&gt;AbB1 AbB1 4 4 4 4&lt;BR /&gt;AbB1a AbB1a 4 4 5 5&lt;BR /&gt;aaaa aaaa 5 5 4 4&lt;BR /&gt;Bcc Bcc 4 4 3 3&lt;BR /&gt;Cdd Cdd 4 4 3 3&lt;BR /&gt;&lt;BR /&gt;</description>
    <pubDate>Wed, 22 Jun 2022 04:13:46 GMT</pubDate>
    <dc:creator>yannlee</dc:creator>
    <dc:date>2022-06-22T04:13:46Z</dc:date>
    <item>
      <title>NOTALPHA() does not return 0 for a string of all alphabetic letters</title>
      <link>https://communities.sas.com/t5/SAS-Programming/NOTALPHA-does-not-return-0-for-a-string-of-all-alphabetic/m-p/819496#M323482</link>
      <description>&lt;P&gt;DATA Tst;&lt;BR /&gt;INPUT Seq $;&lt;BR /&gt;Notalphap=NOTALPHA(Seq);&lt;BR /&gt;Seql=LENGTH(Seq);&lt;BR /&gt;DATALINES;&lt;BR /&gt;AbB1&lt;BR /&gt;aaaa&lt;BR /&gt;Bcc&lt;BR /&gt;Cdd&lt;BR /&gt;;&lt;BR /&gt;RUN;&lt;BR /&gt;PROC SQL;&lt;BR /&gt;SELECT Seq, Notalphap, Seql&lt;BR /&gt;FROM Tst;&lt;BR /&gt;QUIT;&lt;/P&gt;&lt;P&gt;I got&amp;nbsp;&lt;/P&gt;&lt;DIV class=""&gt;&lt;DIV&gt;&lt;DIV align="center"&gt;Seq Notalphap Seql &lt;TABLE cellspacing="0" cellpadding="5"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD&gt;AbB1&lt;/TD&gt;&lt;TD&gt;4&lt;/TD&gt;&lt;TD&gt;4&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;aaaa&lt;/TD&gt;&lt;TD&gt;5&lt;/TD&gt;&lt;TD&gt;4&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;Bcc&lt;/TD&gt;&lt;TD&gt;4&lt;/TD&gt;&lt;TD&gt;3&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;Cdd&lt;/TD&gt;&lt;TD&gt;4&lt;/TD&gt;&lt;TD&gt;3&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Why is Notalphap not 0 for Seq = aaaa, Bcc, or Cdd?&lt;/P&gt;&lt;P&gt;Thanks.&lt;/P&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;</description>
      <pubDate>Wed, 22 Jun 2022 02:02:29 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/NOTALPHA-does-not-return-0-for-a-string-of-all-alphabetic/m-p/819496#M323482</guid>
      <dc:creator>yannlee</dc:creator>
      <dc:date>2022-06-22T02:02:29Z</dc:date>
    </item>
    <item>
      <title>Re: NOTALPHA() does not return 0 for a string of all alphabetic letters</title>
      <link>https://communities.sas.com/t5/SAS-Programming/NOTALPHA-does-not-return-0-for-a-string-of-all-alphabetic/m-p/819502#M323484</link>
      <description>&lt;P&gt;Looks like it's finding those spaces at the end based on the length. Use TRIM() to remove the spaces and get the expected value back.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I agree, not how I would expect the function to work.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;Notalphap=NOTALPHA(trim(Seq));&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Wed, 22 Jun 2022 02:17:48 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/NOTALPHA-does-not-return-0-for-a-string-of-all-alphabetic/m-p/819502#M323484</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2022-06-22T02:17:48Z</dc:date>
    </item>
    <item>
      <title>Re: NOTALPHA() does not return 0 for a string of all alphabetic letters</title>
      <link>https://communities.sas.com/t5/SAS-Programming/NOTALPHA-does-not-return-0-for-a-string-of-all-alphabetic/m-p/819515#M323490</link>
      <description>&lt;P&gt;Space is NOT an ALPHA character.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;SAS stores characters strings as fixed length, padded with space.&amp;nbsp; Since you did NOT define the length of the variable SEQ before using it in the INPUT statement SAS had to GUESS how to define it so it defined it as length of $8.&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="Tom_0-1655865478039.png" style="width: 400px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/72530i7140448390F33F8B/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Tom_0-1655865478039.png" alt="Tom_0-1655865478039.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 22 Jun 2022 02:38:05 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/NOTALPHA-does-not-return-0-for-a-string-of-all-alphabetic/m-p/819515#M323490</guid>
      <dc:creator>Tom</dc:creator>
      <dc:date>2022-06-22T02:38:05Z</dc:date>
    </item>
    <item>
      <title>Re: NOTALPHA() does not return 0 for a string of all alphabetic letters</title>
      <link>https://communities.sas.com/t5/SAS-Programming/NOTALPHA-does-not-return-0-for-a-string-of-all-alphabetic/m-p/819527#M323498</link>
      <description>Dear Reeza,&lt;BR /&gt;Thank you so much.&lt;BR /&gt;However TRIM does not work. Please see below.&lt;BR /&gt;DATA TST;&lt;BR /&gt;INPUT Seq $;&lt;BR /&gt;SeqT=TRIM(Seq);&lt;BR /&gt;Notalphap=NOTALPHA(Seq);&lt;BR /&gt;NotalphaTp=NOTALPHA(SeqT);&lt;BR /&gt;Seql=LENGTH(Seq);&lt;BR /&gt;SeqTl=LENGTH(SeqT);&lt;BR /&gt;DATALINES;&lt;BR /&gt;AbB1&lt;BR /&gt;aaaa&lt;BR /&gt;Bcc&lt;BR /&gt;Cdd&lt;BR /&gt;;&lt;BR /&gt;RUN;&lt;BR /&gt;PROC SQL;&lt;BR /&gt;SELECT Seq, SeqT, Notalphap, NotalphaTp, Seql, SeqTl&lt;BR /&gt;FROM Tst;&lt;BR /&gt;QUIT;&lt;BR /&gt;I got&lt;BR /&gt;Seq SeqT Notalphap NotalphaTp Seql SeqTl&lt;BR /&gt;AbB1 AbB1 4 4 4 4&lt;BR /&gt;AbB1a AbB1a 4 4 5 5&lt;BR /&gt;aaaa aaaa 5 5 4 4&lt;BR /&gt;Bcc Bcc 4 4 3 3&lt;BR /&gt;Cdd Cdd 4 4 3 3&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Wed, 22 Jun 2022 04:13:46 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/NOTALPHA-does-not-return-0-for-a-string-of-all-alphabetic/m-p/819527#M323498</guid>
      <dc:creator>yannlee</dc:creator>
      <dc:date>2022-06-22T04:13:46Z</dc:date>
    </item>
    <item>
      <title>Re: NOTALPHA() does not return 0 for a string of all alphabetic letters</title>
      <link>https://communities.sas.com/t5/SAS-Programming/NOTALPHA-does-not-return-0-for-a-string-of-all-alphabetic/m-p/819530#M323499</link>
      <description>I am sorry that the table becomes disarranged after I post it here.&lt;BR /&gt;</description>
      <pubDate>Wed, 22 Jun 2022 04:20:43 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/NOTALPHA-does-not-return-0-for-a-string-of-all-alphabetic/m-p/819530#M323499</guid>
      <dc:creator>yannlee</dc:creator>
      <dc:date>2022-06-22T04:20:43Z</dc:date>
    </item>
    <item>
      <title>Re: NOTALPHA() does not return 0 for a string of all alphabetic letters</title>
      <link>https://communities.sas.com/t5/SAS-Programming/NOTALPHA-does-not-return-0-for-a-string-of-all-alphabetic/m-p/819531#M323500</link>
      <description>&lt;P&gt;The TRIM HAS to be nested inside NOTALPHA. It wont work as a separate statement as SAS will always pad with blank characters to the right of any non-blank characters.&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;DATA Tst;
INPUT Seq $;
Notalphap=NOTALPHA(trim(Seq));
Seql=LENGTH(Seq);
DATALINES;
AbB1
aaaa
Bcc
Cdd
;
RUN;
PROC SQL;
SELECT Seq, Notalphap, Seql
FROM Tst;
QUIT;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="SASKiwi_0-1655872968964.png" style="width: 400px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/72533i866A2428924EB76C/image-size/medium?v=v2&amp;amp;px=400" role="button" title="SASKiwi_0-1655872968964.png" alt="SASKiwi_0-1655872968964.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 22 Jun 2022 04:43:03 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/NOTALPHA-does-not-return-0-for-a-string-of-all-alphabetic/m-p/819531#M323500</guid>
      <dc:creator>SASKiwi</dc:creator>
      <dc:date>2022-06-22T04:43:03Z</dc:date>
    </item>
    <item>
      <title>Re: NOTALPHA() does not return 0 for a string of all alphabetic letters</title>
      <link>https://communities.sas.com/t5/SAS-Programming/NOTALPHA-does-not-return-0-for-a-string-of-all-alphabetic/m-p/819535#M323502</link>
      <description>&lt;P&gt;For any text that needs to be posted as-is (log, textual data, results), use this button:&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Bildschirmfoto 2020-04-07 um 08.32.59.jpg" style="width: 400px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/54552i914D97BE1B0F21E5/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Bildschirmfoto 2020-04-07 um 08.32.59.jpg" alt="Bildschirmfoto 2020-04-07 um 08.32.59.jpg" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;Use the "little running man" right next to it for SAS code.&lt;/P&gt;</description>
      <pubDate>Wed, 22 Jun 2022 05:11:17 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/NOTALPHA-does-not-return-0-for-a-string-of-all-alphabetic/m-p/819535#M323502</guid>
      <dc:creator>Kurt_Bremser</dc:creator>
      <dc:date>2022-06-22T05:11:17Z</dc:date>
    </item>
    <item>
      <title>Re: NOTALPHA() does not return 0 for a string of all alphabetic letters</title>
      <link>https://communities.sas.com/t5/SAS-Programming/NOTALPHA-does-not-return-0-for-a-string-of-all-alphabetic/m-p/819538#M323503</link>
      <description>&lt;P&gt;Dear SASKiwi, Thanks a lot.&lt;/P&gt;</description>
      <pubDate>Wed, 22 Jun 2022 05:38:53 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/NOTALPHA-does-not-return-0-for-a-string-of-all-alphabetic/m-p/819538#M323503</guid>
      <dc:creator>yannlee</dc:creator>
      <dc:date>2022-06-22T05:38:53Z</dc:date>
    </item>
    <item>
      <title>Re: NOTALPHA() does not return 0 for a string of all alphabetic letters</title>
      <link>https://communities.sas.com/t5/SAS-Programming/NOTALPHA-does-not-return-0-for-a-string-of-all-alphabetic/m-p/819539#M323504</link>
      <description>&lt;P&gt;Dear Tom, Thank you.&lt;/P&gt;</description>
      <pubDate>Wed, 22 Jun 2022 05:40:52 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/NOTALPHA-does-not-return-0-for-a-string-of-all-alphabetic/m-p/819539#M323504</guid>
      <dc:creator>yannlee</dc:creator>
      <dc:date>2022-06-22T05:40:52Z</dc:date>
    </item>
  </channel>
</rss>

