<?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 I need to get rid of the alpha characters of a string that are alpha-numeric in nature. in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/I-need-to-get-rid-of-the-alpha-characters-of-a-string-that-are/m-p/810519#M319613</link>
    <description>&lt;P&gt;Hi SAS community,&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have a variable in a dataset called "id" (short for identification).&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Observations under this variable are recorded as such: 001AB, 002DK, 003LB, 004KC, etc.&amp;nbsp;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;For clarification, the numeric digits refer to the participant number, while the letters refer to the initials of the individual participant in question.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I would simply like to "get rid" of the letters within these id's.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Therefore, 001AB would become simply 001, 002DK would simply become 002, and so forth.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Could anyone point me in the right direction for a solution to this problem?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Many thanks!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Fri, 29 Apr 2022 01:40:03 GMT</pubDate>
    <dc:creator>savyj88</dc:creator>
    <dc:date>2022-04-29T01:40:03Z</dc:date>
    <item>
      <title>I need to get rid of the alpha characters of a string that are alpha-numeric in nature.</title>
      <link>https://communities.sas.com/t5/SAS-Programming/I-need-to-get-rid-of-the-alpha-characters-of-a-string-that-are/m-p/810519#M319613</link>
      <description>&lt;P&gt;Hi SAS community,&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have a variable in a dataset called "id" (short for identification).&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Observations under this variable are recorded as such: 001AB, 002DK, 003LB, 004KC, etc.&amp;nbsp;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;For clarification, the numeric digits refer to the participant number, while the letters refer to the initials of the individual participant in question.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I would simply like to "get rid" of the letters within these id's.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Therefore, 001AB would become simply 001, 002DK would simply become 002, and so forth.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Could anyone point me in the right direction for a solution to this problem?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Many thanks!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 29 Apr 2022 01:40:03 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/I-need-to-get-rid-of-the-alpha-characters-of-a-string-that-are/m-p/810519#M319613</guid>
      <dc:creator>savyj88</dc:creator>
      <dc:date>2022-04-29T01:40:03Z</dc:date>
    </item>
    <item>
      <title>Re: I need to get rid of the alpha characters of a string that are alpha-numeric in nature.</title>
      <link>https://communities.sas.com/t5/SAS-Programming/I-need-to-get-rid-of-the-alpha-characters-of-a-string-that-are/m-p/810521#M319615</link>
      <description>&lt;P&gt;Look at the modifiers on the COMPRESS() function.&lt;/P&gt;
&lt;P&gt;&lt;A href="https://documentation.sas.com/doc/en/vdmmlcdc/1.0/lefunctionsref/n0fcshr0ir3h73n1b845c4aq58hz.htm" target="_blank"&gt;https://documentation.sas.com/doc/en/vdmmlcdc/1.0/lefunctionsref/n0fcshr0ir3h73n1b845c4aq58hz.htm&lt;/A&gt;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data want;
  set have;
  id = compress(id,,'kd');
run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;PRE&gt;284   data want;
285     set have;
286     put id= @;
287     id = compress(id,,'kd');
288     put '-&amp;gt; ' id ;
289   run;

id=001AB -&amp;gt; 001
id=002DK -&amp;gt; 002
id=003LB -&amp;gt; 003
id=004KC -&amp;gt; 004
NOTE: There were 4 observations read from the data set WORK.HAVE.
NOTE: The data set WORK.WANT has 4 observations and 1 variables.
&lt;/PRE&gt;</description>
      <pubDate>Fri, 29 Apr 2022 01:47:02 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/I-need-to-get-rid-of-the-alpha-characters-of-a-string-that-are/m-p/810521#M319615</guid>
      <dc:creator>Tom</dc:creator>
      <dc:date>2022-04-29T01:47:02Z</dc:date>
    </item>
    <item>
      <title>Re: I need to get rid of the alpha characters of a string that are alpha-numeric in nature.</title>
      <link>https://communities.sas.com/t5/SAS-Programming/I-need-to-get-rid-of-the-alpha-characters-of-a-string-that-are/m-p/810590#M319648</link>
      <description>&lt;P&gt;Here's one way to do it ...&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;data foo;&lt;BR /&gt;id='001RA';&lt;BR /&gt;run;&lt;BR /&gt;&lt;BR /&gt;data foo; set foo;&lt;BR /&gt;id=substr(id,1,length(id)-2);&lt;BR /&gt;run;&lt;BR /&gt;&lt;BR /&gt;proc print data=foo; &lt;BR /&gt;run;&lt;/PRE&gt;</description>
      <pubDate>Fri, 29 Apr 2022 11:54:04 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/I-need-to-get-rid-of-the-alpha-characters-of-a-string-that-are/m-p/810590#M319648</guid>
      <dc:creator>GraphGuy</dc:creator>
      <dc:date>2022-04-29T11:54:04Z</dc:date>
    </item>
  </channel>
</rss>

