<?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: deleting repetitive text within a cell in SAS Data Management</title>
    <link>https://communities.sas.com/t5/SAS-Data-Management/deleting-repetitive-text-within-a-cell/m-p/177975#M3570</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Arthur,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I did your code and it worked for my sample, here is the result:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;TABLE cellpadding="5" cellspacing="0" class="table" frame="box" rules="all" summary="Procedure Print: Data Set WORK.WANT"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TH class="r rowheader" scope="row"&gt;1&lt;/TH&gt;&lt;TD class="l data"&gt;&lt;P&gt;ALCO Stores, Inc.&lt;/P&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Sat, 21 Feb 2015 14:16:08 GMT</pubDate>
    <dc:creator>ilikesas</dc:creator>
    <dc:date>2015-02-21T14:16:08Z</dc:date>
    <item>
      <title>deleting repetitive text within a cell</title>
      <link>https://communities.sas.com/t5/SAS-Data-Management/deleting-repetitive-text-within-a-cell/m-p/177969#M3564</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;hi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;suppose I have the following table:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;TABLE border="1" class="jiveBorder" height="99" style="border: 1px solid rgb(0, 0, 0); width: 271px; height: 95px;"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TH style="text-align: center; background-color: #6690bc; color: #ffffff; padding: 2px;" valign="middle"&gt;&lt;STRONG&gt;Comp Name&lt;/STRONG&gt;&lt;/TH&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD style="padding: 2px;"&gt;&lt;P&gt;The company ABC&lt;/P&gt;&lt;P&gt;The company ABC&lt;/P&gt;&lt;P&gt;The company ABC&lt;/P&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD style="padding: 2px;"&gt;&lt;P style="font-size: 13.3333330154419px;"&gt;The company DEF&lt;/P&gt;&lt;P style="font-size: 13.3333330154419px;"&gt;The company DEF&lt;/P&gt;&lt;P style="font-size: 13.3333330154419px;"&gt;The company DEF&lt;/P&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;That is, inside each cell I have a repetition, so what I would like to obtain is the deletion of the repetition so that the new table should be as following&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;TABLE border="1" class="jiveBorder" height="93" style="border: 1px solid rgb(0, 0, 0); width: 202px; height: 95px;"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TH style="text-align: center; background-color: #6690bc; color: #ffffff; padding: 2px;" valign="middle"&gt;&lt;STRONG&gt;Comp Name&lt;/STRONG&gt;&lt;/TH&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD style="padding: 2px;"&gt;&lt;SPAN style="font-size: 13.3333330154419px;"&gt;The company ABC&lt;/SPAN&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD style="padding: 2px;"&gt;&lt;SPAN style="font-size: 13.3333330154419px;"&gt;The company DEF&lt;/SPAN&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thank you!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 21 Feb 2015 00:52:12 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Data-Management/deleting-repetitive-text-within-a-cell/m-p/177969#M3564</guid>
      <dc:creator>ilikesas</dc:creator>
      <dc:date>2015-02-21T00:52:12Z</dc:date>
    </item>
    <item>
      <title>Re: deleting repetitive text within a cell</title>
      <link>https://communities.sas.com/t5/SAS-Data-Management/deleting-repetitive-text-within-a-cell/m-p/177970#M3565</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;SAS doesn't really have cells. Is your data originally in Excel?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Does each variable/row contain the repetitive text or are they separate rows?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 21 Feb 2015 01:19:54 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Data-Management/deleting-repetitive-text-within-a-cell/m-p/177970#M3565</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2015-02-21T01:19:54Z</dc:date>
    </item>
    <item>
      <title>Re: deleting repetitive text within a cell</title>
      <link>https://communities.sas.com/t5/SAS-Data-Management/deleting-repetitive-text-within-a-cell/m-p/177971#M3566</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Reeza,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Actually my original data is in Excel, sorry for not mentioning that, and there in Excel each row contains the repetitive text, just as I showed in my table above.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 21 Feb 2015 01:27:57 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Data-Management/deleting-repetitive-text-within-a-cell/m-p/177971#M3566</guid>
      <dc:creator>ilikesas</dc:creator>
      <dc:date>2015-02-21T01:27:57Z</dc:date>
    </item>
    <item>
      <title>Re: deleting repetitive text within a cell</title>
      <link>https://communities.sas.com/t5/SAS-Data-Management/deleting-repetitive-text-within-a-cell/m-p/177972#M3567</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;What happens when you import it? &lt;/P&gt;&lt;P&gt;Also, can you attach a sample file. &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 21 Feb 2015 04:32:21 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Data-Management/deleting-repetitive-text-within-a-cell/m-p/177972#M3567</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2015-02-21T04:32:21Z</dc:date>
    </item>
    <item>
      <title>Re: deleting repetitive text within a cell</title>
      <link>https://communities.sas.com/t5/SAS-Data-Management/deleting-repetitive-text-within-a-cell/m-p/177973#M3568</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Daniel,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Can't say for sure without seeing your sas dataset but, if your file is called have and the variable is actually imported as comp_name, then the following might do what you want:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data want (drop=_:);&lt;/P&gt;&lt;P&gt;&amp;nbsp; length comp_name $40;&lt;/P&gt;&lt;P&gt;&amp;nbsp; set have (rename=(comp_name=_c));&lt;/P&gt;&lt;P&gt;&amp;nbsp; comp_name=scan(_c,1,,'c');&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 21 Feb 2015 05:38:29 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Data-Management/deleting-repetitive-text-within-a-cell/m-p/177973#M3568</guid>
      <dc:creator>art297</dc:creator>
      <dc:date>2015-02-21T05:38:29Z</dc:date>
    </item>
    <item>
      <title>Re: deleting repetitive text within a cell</title>
      <link>https://communities.sas.com/t5/SAS-Data-Management/deleting-repetitive-text-within-a-cell/m-p/177974#M3569</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;When I do a proc print of the imported excel file I get:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;TABLE cellpadding="5" cellspacing="0" class="table" frame="box" rules="all" summary="Procedure Print: Data Set WORK.BANKRUPTCY"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TH class="r rowheader" scope="row"&gt;1&lt;/TH&gt;&lt;TD class="l data"&gt;ALCO Stores, Inc. ALCO Stores, Inc. ALCO Stores, Inc&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;that is, the repetition is put into a sequence&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 21 Feb 2015 14:14:56 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Data-Management/deleting-repetitive-text-within-a-cell/m-p/177974#M3569</guid>
      <dc:creator>ilikesas</dc:creator>
      <dc:date>2015-02-21T14:14:56Z</dc:date>
    </item>
    <item>
      <title>Re: deleting repetitive text within a cell</title>
      <link>https://communities.sas.com/t5/SAS-Data-Management/deleting-repetitive-text-within-a-cell/m-p/177975#M3570</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Arthur,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I did your code and it worked for my sample, here is the result:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;TABLE cellpadding="5" cellspacing="0" class="table" frame="box" rules="all" summary="Procedure Print: Data Set WORK.WANT"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TH class="r rowheader" scope="row"&gt;1&lt;/TH&gt;&lt;TD class="l data"&gt;&lt;P&gt;ALCO Stores, Inc.&lt;/P&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 21 Feb 2015 14:16:08 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Data-Management/deleting-repetitive-text-within-a-cell/m-p/177975#M3570</guid>
      <dc:creator>ilikesas</dc:creator>
      <dc:date>2015-02-21T14:16:08Z</dc:date>
    </item>
  </channel>
</rss>

