<?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 Delete / cut text at the end of string in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Delete-cut-text-at-the-end-of-string/m-p/332885#M74969</link>
    <description>&lt;P&gt;Hi Everyone,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I have a variable of text "name" with very much randon lenght and rule.&lt;/P&gt;
&lt;P&gt;I want to create a new variable that equal to the "name" with the last 3 character deleted.&lt;/P&gt;
&lt;P&gt;So for the file below, the output should be:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;va&lt;BR /&gt;subva&lt;BR /&gt;notsu&lt;BR /&gt;sas_conditio&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;Look around and I find the code here. Just want to make a new thread so other can use.&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thanks.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;HHC&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;data have;&lt;BR /&gt;input name $;&lt;BR /&gt;datalines;&lt;BR /&gt;value&lt;BR /&gt;subvalue&lt;BR /&gt;notsure1&lt;BR /&gt;sas_condition12&lt;BR /&gt;run;&lt;BR /&gt;&lt;BR /&gt;data want; &lt;BR /&gt;set have;&lt;BR /&gt; new=substr(name, 1, length(name)-3);&lt;BR /&gt;run;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Wed, 15 Feb 2017 03:21:28 GMT</pubDate>
    <dc:creator>hhchenfx</dc:creator>
    <dc:date>2017-02-15T03:21:28Z</dc:date>
    <item>
      <title>Delete / cut text at the end of string</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Delete-cut-text-at-the-end-of-string/m-p/332885#M74969</link>
      <description>&lt;P&gt;Hi Everyone,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I have a variable of text "name" with very much randon lenght and rule.&lt;/P&gt;
&lt;P&gt;I want to create a new variable that equal to the "name" with the last 3 character deleted.&lt;/P&gt;
&lt;P&gt;So for the file below, the output should be:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;va&lt;BR /&gt;subva&lt;BR /&gt;notsu&lt;BR /&gt;sas_conditio&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;Look around and I find the code here. Just want to make a new thread so other can use.&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thanks.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;HHC&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;data have;&lt;BR /&gt;input name $;&lt;BR /&gt;datalines;&lt;BR /&gt;value&lt;BR /&gt;subvalue&lt;BR /&gt;notsure1&lt;BR /&gt;sas_condition12&lt;BR /&gt;run;&lt;BR /&gt;&lt;BR /&gt;data want; &lt;BR /&gt;set have;&lt;BR /&gt; new=substr(name, 1, length(name)-3);&lt;BR /&gt;run;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 15 Feb 2017 03:21:28 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Delete-cut-text-at-the-end-of-string/m-p/332885#M74969</guid>
      <dc:creator>hhchenfx</dc:creator>
      <dc:date>2017-02-15T03:21:28Z</dc:date>
    </item>
    <item>
      <title>Re: Delete / cut text at the end of string</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Delete-cut-text-at-the-end-of-string/m-p/332886#M74970</link>
      <description>I got it.&lt;BR /&gt;HC</description>
      <pubDate>Wed, 15 Feb 2017 03:21:44 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Delete-cut-text-at-the-end-of-string/m-p/332886#M74970</guid>
      <dc:creator>hhchenfx</dc:creator>
      <dc:date>2017-02-15T03:21:44Z</dc:date>
    </item>
    <item>
      <title>Re: Delete / cut text at the end of string</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Delete-cut-text-at-the-end-of-string/m-p/333054#M75004</link>
      <description>&lt;P&gt;Please provide details of your solution. Some may be searching for a solution to a similar problem and finding a thread markded as solved but with no solution doesn't help others later.&lt;/P&gt;</description>
      <pubDate>Wed, 15 Feb 2017 15:38:04 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Delete-cut-text-at-the-end-of-string/m-p/333054#M75004</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2017-02-15T15:38:04Z</dc:date>
    </item>
    <item>
      <title>Re: Delete / cut text at the end of string</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Delete-cut-text-at-the-end-of-string/m-p/333270#M75068</link>
      <description>&lt;P&gt;Actually I put the solution right in the original post.&lt;/P&gt;
&lt;P&gt;But thank you for reminding me. I will make it clearer.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data have;
input name $;
datalines;
value
subvalue
notsure1
sas_condition12
run;

data want; 
set have;
 new=substr(name, 1, length(name)-3);
run;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Thu, 16 Feb 2017 04:03:31 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Delete-cut-text-at-the-end-of-string/m-p/333270#M75068</guid>
      <dc:creator>hhchenfx</dc:creator>
      <dc:date>2017-02-16T04:03:31Z</dc:date>
    </item>
  </channel>
</rss>

