<?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: Help needed in SAS Data Management</title>
    <link>https://communities.sas.com/t5/SAS-Data-Management/Keep-only-alphanumeric-characters-from-character-string/m-p/482405#M15036</link>
    <description>&lt;P&gt;For future note, good idea to post test data (form of a datastep) and required output, so we can see input and output.&amp;nbsp; Something like:&lt;/P&gt;
&lt;PRE&gt;want=substr(compress(agreement,"","ka"),1,3);&lt;/PRE&gt;
&lt;P&gt;Should work.&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Mon, 30 Jul 2018 09:56:08 GMT</pubDate>
    <dc:creator>RW9</dc:creator>
    <dc:date>2018-07-30T09:56:08Z</dc:date>
    <item>
      <title>Keep only alphanumeric characters from character string</title>
      <link>https://communities.sas.com/t5/SAS-Data-Management/Keep-only-alphanumeric-characters-from-character-string/m-p/482399#M15031</link>
      <description>&lt;P&gt;Hi there,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I have a simple query i want to execute and I'm finding it hard, as I'm new to this.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I have a list off "Agreement" numbers but they have character and numeric values and I just want to extract the characters into a new column.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Example of "Agreement" number:&lt;/P&gt;
&lt;P&gt;BAU123455L - I only need BAU&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;below is the code I used but getting no results.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;if substr(left(Agreement),3) = 'BRN'&amp;nbsp;&amp;nbsp;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Mon, 30 Jul 2018 09:44:53 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Data-Management/Keep-only-alphanumeric-characters-from-character-string/m-p/482399#M15031</guid>
      <dc:creator>Ela_84</dc:creator>
      <dc:date>2018-07-30T09:44:53Z</dc:date>
    </item>
    <item>
      <title>Re: Help needed</title>
      <link>https://communities.sas.com/t5/SAS-Data-Management/Keep-only-alphanumeric-characters-from-character-string/m-p/482400#M15032</link>
      <description>&lt;P&gt;Something like:&lt;/P&gt;
&lt;PRE&gt;want=compress(agreement,"","ka");&lt;/PRE&gt;
&lt;P&gt;You can find details of the options k and a in the documentation:&lt;/P&gt;
&lt;P&gt;&lt;A href="http://support.sas.com/documentation/cdl/en/lrdict/64316/HTML/default/viewer.htm#a000212246.htm" target="_blank"&gt;http://support.sas.com/documentation/cdl/en/lrdict/64316/HTML/default/viewer.htm#a000212246.htm&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 30 Jul 2018 09:43:10 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Data-Management/Keep-only-alphanumeric-characters-from-character-string/m-p/482400#M15032</guid>
      <dc:creator>RW9</dc:creator>
      <dc:date>2018-07-30T09:43:10Z</dc:date>
    </item>
    <item>
      <title>Re: Keep only alphanumeric characters from character string</title>
      <link>https://communities.sas.com/t5/SAS-Data-Management/Keep-only-alphanumeric-characters-from-character-string/m-p/482403#M15034</link>
      <description>&lt;P&gt;Just define a new variable with the function you are using. Check the example below.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data test;
	agreement = '  BAU123455L';
	newcol = substr(left(agreement),1,3);
run;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Mon, 30 Jul 2018 09:49:48 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Data-Management/Keep-only-alphanumeric-characters-from-character-string/m-p/482403#M15034</guid>
      <dc:creator>smicha</dc:creator>
      <dc:date>2018-07-30T09:49:48Z</dc:date>
    </item>
    <item>
      <title>Re: Help needed</title>
      <link>https://communities.sas.com/t5/SAS-Data-Management/Keep-only-alphanumeric-characters-from-character-string/m-p/482404#M15035</link>
      <description>&lt;P&gt;Hi RW9,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you for your quick response - it works but I only want the first 3 characters - this is bring the letter at the end as well and I just need the first 3 characters?&lt;/P&gt;</description>
      <pubDate>Mon, 30 Jul 2018 09:51:44 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Data-Management/Keep-only-alphanumeric-characters-from-character-string/m-p/482404#M15035</guid>
      <dc:creator>Ela_84</dc:creator>
      <dc:date>2018-07-30T09:51:44Z</dc:date>
    </item>
    <item>
      <title>Re: Help needed</title>
      <link>https://communities.sas.com/t5/SAS-Data-Management/Keep-only-alphanumeric-characters-from-character-string/m-p/482405#M15036</link>
      <description>&lt;P&gt;For future note, good idea to post test data (form of a datastep) and required output, so we can see input and output.&amp;nbsp; Something like:&lt;/P&gt;
&lt;PRE&gt;want=substr(compress(agreement,"","ka"),1,3);&lt;/PRE&gt;
&lt;P&gt;Should work.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 30 Jul 2018 09:56:08 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Data-Management/Keep-only-alphanumeric-characters-from-character-string/m-p/482405#M15036</guid>
      <dc:creator>RW9</dc:creator>
      <dc:date>2018-07-30T09:56:08Z</dc:date>
    </item>
    <item>
      <title>Re: Help needed</title>
      <link>https://communities.sas.com/t5/SAS-Data-Management/Keep-only-alphanumeric-characters-from-character-string/m-p/482406#M15037</link>
      <description>&lt;P&gt;Thank you so much RW9.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;This has helped, in future I will share more info. this was my first time I submitted a question and you guys are very helpful.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you again.&lt;/P&gt;</description>
      <pubDate>Mon, 30 Jul 2018 09:59:41 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Data-Management/Keep-only-alphanumeric-characters-from-character-string/m-p/482406#M15037</guid>
      <dc:creator>Ela_84</dc:creator>
      <dc:date>2018-07-30T09:59:41Z</dc:date>
    </item>
    <item>
      <title>Re: Help needed</title>
      <link>https://communities.sas.com/t5/SAS-Data-Management/Keep-only-alphanumeric-characters-from-character-string/m-p/482475#M15038</link>
      <description>&lt;P&gt;Glad you got a good answer! Another suggestion...in the future, give your post a meaningful title, something like what RW9 edited it to. It makes it easer to decide whether to take a look at it or not.&lt;/P&gt;
&lt;P&gt;Tom&lt;/P&gt;</description>
      <pubDate>Mon, 30 Jul 2018 14:18:29 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Data-Management/Keep-only-alphanumeric-characters-from-character-string/m-p/482475#M15038</guid>
      <dc:creator>TomKari</dc:creator>
      <dc:date>2018-07-30T14:18:29Z</dc:date>
    </item>
  </channel>
</rss>

