<?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: Intentional truncation of data in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Intentional-truncation-of-data/m-p/144184#M261835</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Depending on your actual data, this might work (kicks out ( and ) without replacement):&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Data A;&lt;/P&gt;&lt;P&gt;&amp;nbsp; Ex="xxxcd(1dfd32)"; Output;&lt;/P&gt;&lt;P&gt;&amp;nbsp; Ex="gegewx1d (322)"; Output;&lt;/P&gt;&lt;P&gt;Run;&lt;/P&gt;&lt;P&gt;Data B;&lt;/P&gt;&lt;P&gt;&amp;nbsp; Set A;&lt;/P&gt;&lt;P&gt;&amp;nbsp; Ex_new=PRXChange("s/[\(\)]//",-1,Ex);&lt;/P&gt;&lt;P&gt;Run;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 28 Oct 2014 11:30:29 GMT</pubDate>
    <dc:creator>user24feb</dc:creator>
    <dc:date>2014-10-28T11:30:29Z</dc:date>
    <item>
      <title>Intentional truncation of data</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Intentional-truncation-of-data/m-p/144180#M261831</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; I have data that includes the name of a town in parenthesis.&amp;nbsp; I want to get rid of what's in the parenthesis.&amp;nbsp; Is there a way to do this in SAS...or does it need to be done outside of SAS?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks in advance.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 27 Oct 2014 21:38:41 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Intentional-truncation-of-data/m-p/144180#M261831</guid>
      <dc:creator>mkd</dc:creator>
      <dc:date>2014-10-27T21:38:41Z</dc:date>
    </item>
    <item>
      <title>Re: Intentional truncation of data</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Intentional-truncation-of-data/m-p/144181#M261832</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Please show some sample data.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 27 Oct 2014 21:44:20 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Intentional-truncation-of-data/m-p/144181#M261832</guid>
      <dc:creator>stat_sas</dc:creator>
      <dc:date>2014-10-27T21:44:20Z</dc:date>
    </item>
    <item>
      <title>Re: Intentional truncation of data</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Intentional-truncation-of-data/m-p/144182#M261833</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;One approach, inside a data step is to include code similar to &lt;/P&gt;&lt;P&gt;Variable = substr(variable, 1,(index(variable,'(')-1));&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 27 Oct 2014 23:04:51 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Intentional-truncation-of-data/m-p/144182#M261833</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2014-10-27T23:04:51Z</dc:date>
    </item>
    <item>
      <title>Re: Intentional truncation of data</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Intentional-truncation-of-data/m-p/144183#M261834</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I will select the first word separated by "(" character with an scan function in the datastep&lt;/P&gt;&lt;P&gt;newvar=&lt;SPAN style="font-family: 'Courier New'; font-size: 10pt; color: black; background: white;"&gt;SCAN(var,&lt;/SPAN&gt;&lt;SPAN style="color: #008080; font-size: 10pt; background: white; font-family: 'Courier New';"&gt;&lt;STRONG&gt;1,'('&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; font-size: 10pt; color: black; background: white;"&gt;);&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 28 Oct 2014 11:02:00 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Intentional-truncation-of-data/m-p/144183#M261834</guid>
      <dc:creator>arodriguez</dc:creator>
      <dc:date>2014-10-28T11:02:00Z</dc:date>
    </item>
    <item>
      <title>Re: Intentional truncation of data</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Intentional-truncation-of-data/m-p/144184#M261835</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Depending on your actual data, this might work (kicks out ( and ) without replacement):&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Data A;&lt;/P&gt;&lt;P&gt;&amp;nbsp; Ex="xxxcd(1dfd32)"; Output;&lt;/P&gt;&lt;P&gt;&amp;nbsp; Ex="gegewx1d (322)"; Output;&lt;/P&gt;&lt;P&gt;Run;&lt;/P&gt;&lt;P&gt;Data B;&lt;/P&gt;&lt;P&gt;&amp;nbsp; Set A;&lt;/P&gt;&lt;P&gt;&amp;nbsp; Ex_new=PRXChange("s/[\(\)]//",-1,Ex);&lt;/P&gt;&lt;P&gt;Run;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 28 Oct 2014 11:30:29 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Intentional-truncation-of-data/m-p/144184#M261835</guid>
      <dc:creator>user24feb</dc:creator>
      <dc:date>2014-10-28T11:30:29Z</dc:date>
    </item>
    <item>
      <title>Re: Intentional truncation of data</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Intentional-truncation-of-data/m-p/144185#M261836</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;This was very useful and did what I needed.&amp;nbsp; Thank you for answering, however, I found the SCAN function much easier to use and most likely easier for me to remember in the future.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 28 Oct 2014 14:59:12 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Intentional-truncation-of-data/m-p/144185#M261836</guid>
      <dc:creator>mkd</dc:creator>
      <dc:date>2014-10-28T14:59:12Z</dc:date>
    </item>
  </channel>
</rss>

