<?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: taking out dashes from ID in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/taking-out-dashes-from-ID/m-p/538150#M148125</link>
    <description>&lt;P&gt;Thanks you!&lt;/P&gt;</description>
    <pubDate>Sun, 24 Feb 2019 22:58:42 GMT</pubDate>
    <dc:creator>desireatem</dc:creator>
    <dc:date>2019-02-24T22:58:42Z</dc:date>
    <item>
      <title>taking out dashes from ID</title>
      <link>https://communities.sas.com/t5/SAS-Programming/taking-out-dashes-from-ID/m-p/538146#M148121</link>
      <description>&lt;P&gt;Hello-.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I have ID variable as such;&lt;/P&gt;
&lt;P&gt;How can I take out the dashes (-) in the ID?&lt;/P&gt;
&lt;DIV class="branch"&gt;
&lt;DIV&gt;
&lt;DIV align="center"&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;ID&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Age
&lt;TABLE class="table" summary="Procedure Print: Data Set WORK.CFI" frame="box" rules="all" cellspacing="0" cellpadding="5"&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;01-1-001&lt;/TD&gt;
&lt;TD class="r data"&gt;40&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TH class="r rowheader" scope="row"&gt;2&lt;/TH&gt;
&lt;TD class="l data"&gt;01-1-001&lt;/TD&gt;
&lt;TD class="r data"&gt;40&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TH class="r rowheader" scope="row"&gt;3&lt;/TH&gt;
&lt;TD class="l data"&gt;01-1-001&lt;/TD&gt;
&lt;TD class="r data"&gt;40&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TH class="r rowheader" scope="row"&gt;4&lt;/TH&gt;
&lt;TD class="l data"&gt;01-1-001&lt;/TD&gt;
&lt;TD class="r data"&gt;40&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TH class="r rowheader" scope="row"&gt;5&lt;/TH&gt;
&lt;TD class="l data"&gt;01-1-002&lt;/TD&gt;
&lt;TD class="r data"&gt;29&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TH class="r rowheader" scope="row"&gt;6&lt;/TH&gt;
&lt;TD class="l data"&gt;01-1-002&lt;/TD&gt;
&lt;TD class="r data"&gt;29&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TH class="r rowheader" scope="row"&gt;7&lt;/TH&gt;
&lt;TD class="l data"&gt;01-1-002&lt;/TD&gt;
&lt;TD class="r data"&gt;29&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TH class="r rowheader" scope="row"&gt;&amp;nbsp;&lt;/TH&gt;
&lt;TD class="l data"&gt;&amp;nbsp;&lt;/TD&gt;
&lt;/TR&gt;
&lt;/TBODY&gt;
&lt;/TABLE&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;</description>
      <pubDate>Sun, 24 Feb 2019 22:37:32 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/taking-out-dashes-from-ID/m-p/538146#M148121</guid>
      <dc:creator>desireatem</dc:creator>
      <dc:date>2019-02-24T22:37:32Z</dc:date>
    </item>
    <item>
      <title>Re: taking out dashes from ID</title>
      <link>https://communities.sas.com/t5/SAS-Programming/taking-out-dashes-from-ID/m-p/538148#M148123</link>
      <description>&lt;P&gt;To get rid of them:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;ID = compress(ID, '-');&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If you want to change them to blanks instead, use the TRANSLATE function instead of COMPRESS.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;ID = translate(ID, ' ', '-');&lt;/P&gt;</description>
      <pubDate>Sun, 24 Feb 2019 22:47:13 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/taking-out-dashes-from-ID/m-p/538148#M148123</guid>
      <dc:creator>Astounding</dc:creator>
      <dc:date>2019-02-24T22:47:13Z</dc:date>
    </item>
    <item>
      <title>Re: taking out dashes from ID</title>
      <link>https://communities.sas.com/t5/SAS-Programming/taking-out-dashes-from-ID/m-p/538150#M148125</link>
      <description>&lt;P&gt;Thanks you!&lt;/P&gt;</description>
      <pubDate>Sun, 24 Feb 2019 22:58:42 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/taking-out-dashes-from-ID/m-p/538150#M148125</guid>
      <dc:creator>desireatem</dc:creator>
      <dc:date>2019-02-24T22:58:42Z</dc:date>
    </item>
    <item>
      <title>Re: taking out dashes from ID</title>
      <link>https://communities.sas.com/t5/SAS-Programming/taking-out-dashes-from-ID/m-p/538235#M148157</link>
      <description>&lt;P&gt;Alternatively, you can also try the perl regular expression&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data want;
input id$;
&lt;STRONG&gt;id=prxchange('s/-//i',-1,id);&lt;/STRONG&gt;
cards;
01-1-001
;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Mon, 25 Feb 2019 10:36:36 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/taking-out-dashes-from-ID/m-p/538235#M148157</guid>
      <dc:creator>Jagadishkatam</dc:creator>
      <dc:date>2019-02-25T10:36:36Z</dc:date>
    </item>
    <item>
      <title>Re: taking out dashes from ID</title>
      <link>https://communities.sas.com/t5/SAS-Programming/taking-out-dashes-from-ID/m-p/538271#M148163</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/12151"&gt;@Jagadishkatam&lt;/a&gt; &amp;nbsp; Appreciate your enthusiasm, however for this case(OP's requirement) I don't think PRX is an alternative. It is awfully slow when I tested with 40 million records. However, I like your thinking. PRX is better utilized for complex patterns as opposed to straight forward use of SAS functions such as this case.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Nonetheless, thank you for your contribution&lt;/P&gt;</description>
      <pubDate>Mon, 25 Feb 2019 14:29:58 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/taking-out-dashes-from-ID/m-p/538271#M148163</guid>
      <dc:creator>Andygray</dc:creator>
      <dc:date>2019-02-25T14:29:58Z</dc:date>
    </item>
  </channel>
</rss>

