<?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: Equivalent SAS Functions Needed to Replace Teradata Functions in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Equivalent-SAS-Functions-Needed-to-Replace-Teradata-Functions/m-p/579758#M164624</link>
    <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/284439"&gt;@ijm_wf&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;
&lt;P&gt;Can someone please suggest SAS functions that are equivalent to the following Teradata functions?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;EDITDISTANCE&lt;/P&gt;
&lt;P&gt;REGEXP_REPLACE&lt;/P&gt;
&lt;P&gt;POSITION&lt;/P&gt;
&lt;P&gt;REGEXP_INSTR&lt;/P&gt;
&lt;P&gt;OREPLACE&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;Please provide explanation of what those functions do.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;From the names I would guess that POSITION is probably INDEX or FIND (or INDEXW or FINDW).&lt;/P&gt;
&lt;P&gt;No idea what the O in OREPLACE means but perhaps that is like the TRANWRD function?&lt;/P&gt;
&lt;P&gt;There is a whole series perl regular expression functions in SAS.&lt;/P&gt;</description>
    <pubDate>Wed, 07 Aug 2019 20:43:07 GMT</pubDate>
    <dc:creator>Tom</dc:creator>
    <dc:date>2019-08-07T20:43:07Z</dc:date>
    <item>
      <title>Equivalent SAS Functions Needed to Replace Teradata Functions</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Equivalent-SAS-Functions-Needed-to-Replace-Teradata-Functions/m-p/579742#M164615</link>
      <description>&lt;P&gt;Can someone please suggest SAS functions that are equivalent to the following Teradata functions?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;EDITDISTANCE&lt;/P&gt;&lt;P&gt;REGEXP_REPLACE&lt;/P&gt;&lt;P&gt;POSITION&lt;/P&gt;&lt;P&gt;REGEXP_INSTR&lt;/P&gt;&lt;P&gt;OREPLACE&lt;/P&gt;</description>
      <pubDate>Wed, 07 Aug 2019 19:55:10 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Equivalent-SAS-Functions-Needed-to-Replace-Teradata-Functions/m-p/579742#M164615</guid>
      <dc:creator>ijm_wf</dc:creator>
      <dc:date>2019-08-07T19:55:10Z</dc:date>
    </item>
    <item>
      <title>Re: Equivalent SAS Functions Needed to Replace Teradata Functions</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Equivalent-SAS-Functions-Needed-to-Replace-Teradata-Functions/m-p/579758#M164624</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/284439"&gt;@ijm_wf&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;
&lt;P&gt;Can someone please suggest SAS functions that are equivalent to the following Teradata functions?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;EDITDISTANCE&lt;/P&gt;
&lt;P&gt;REGEXP_REPLACE&lt;/P&gt;
&lt;P&gt;POSITION&lt;/P&gt;
&lt;P&gt;REGEXP_INSTR&lt;/P&gt;
&lt;P&gt;OREPLACE&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;Please provide explanation of what those functions do.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;From the names I would guess that POSITION is probably INDEX or FIND (or INDEXW or FINDW).&lt;/P&gt;
&lt;P&gt;No idea what the O in OREPLACE means but perhaps that is like the TRANWRD function?&lt;/P&gt;
&lt;P&gt;There is a whole series perl regular expression functions in SAS.&lt;/P&gt;</description>
      <pubDate>Wed, 07 Aug 2019 20:43:07 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Equivalent-SAS-Functions-Needed-to-Replace-Teradata-Functions/m-p/579758#M164624</guid>
      <dc:creator>Tom</dc:creator>
      <dc:date>2019-08-07T20:43:07Z</dc:date>
    </item>
    <item>
      <title>Re: Equivalent SAS Functions Needed to Replace Teradata Functions</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Equivalent-SAS-Functions-Needed-to-Replace-Teradata-Functions/m-p/579762#M164626</link>
      <description>You can use TERADATA functions if you use Passthrough. Not sure about EDITDISTANCE but the rest look like regex functions. I highly recommend bookmarking this page:&lt;BR /&gt;&lt;BR /&gt;&lt;A href="https://documentation.sas.com/?docsetId=lefunctionsref&amp;amp;docsetTarget=n01f5qrjoh9h4hn1olbdpb5pr2td.htm&amp;amp;docsetVersion=9.4&amp;amp;locale=en" target="_blank"&gt;https://documentation.sas.com/?docsetId=lefunctionsref&amp;amp;docsetTarget=n01f5qrjoh9h4hn1olbdpb5pr2td.htm&amp;amp;docsetVersion=9.4&amp;amp;locale=en&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;You can find the functions you need under the character matching category.</description>
      <pubDate>Wed, 07 Aug 2019 21:11:58 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Equivalent-SAS-Functions-Needed-to-Replace-Teradata-Functions/m-p/579762#M164626</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2019-08-07T21:11:58Z</dc:date>
    </item>
    <item>
      <title>Re: Equivalent SAS Functions Needed to Replace Teradata Functions</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Equivalent-SAS-Functions-Needed-to-Replace-Teradata-Functions/m-p/579779#M164632</link>
      <description>&lt;P&gt;SAS provides functions COMPGED, COMPLEV, and STEPIS for computing edit distances.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;SAS main REGEX functions are called PRXPARSE, PRXMATCH, and PRXCHANGE.&lt;/P&gt;</description>
      <pubDate>Thu, 08 Aug 2019 03:12:51 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Equivalent-SAS-Functions-Needed-to-Replace-Teradata-Functions/m-p/579779#M164632</guid>
      <dc:creator>PGStats</dc:creator>
      <dc:date>2019-08-08T03:12:51Z</dc:date>
    </item>
    <item>
      <title>Re: Equivalent SAS Functions Needed to Replace Teradata Functions</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Equivalent-SAS-Functions-Needed-to-Replace-Teradata-Functions/m-p/579780#M164633</link>
      <description>&lt;P&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/284439"&gt;@ijm_wf&lt;/a&gt;:&lt;/P&gt;
&lt;P&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/159"&gt;@Tom&lt;/a&gt;&amp;nbsp;and&amp;nbsp;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/13879"&gt;@Reeza&lt;/a&gt;&amp;nbsp;have already responded with the correct suggestions wrt POSITION, OREPLACE, and REGEX*.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;In Teradata, EDITDISTANCE computes the&amp;nbsp;&lt;SPAN&gt;Damerau–Levenshtein distance between two strings, which&amp;nbsp;is the minimal number of certain operations&amp;nbsp;required to change one string into the other. SAS has 3 functions that do this type of job: SPEDIS, COMPLEV, and COMPGED. COMPLEV looks the closest since it computes the Levenshtein edit distance - but not quite, since the&amp;nbsp;Damerau–Levenshtein algorithm adds the transposition operation to the classic Levenshtein. &lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;The SAS documentation doesn't say whether COMPLEV computes&amp;nbsp;the classic Levenshtein or&amp;nbsp;Damerau–Levenshtein. If it's the latter, then EDITDISTANCE in Teradata is equivalent to COMPLEV in SAS. If it's the former, then COMPLEV is not it. However, I strongly suspect that the COMPGED function (GED=Generalized Edit Distance) has the arguments and flexibility to cover the&amp;nbsp;Damerau–Levenshtein algorithm, and then some.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;Kind regards&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;Paul D.&amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 08 Aug 2019 03:16:47 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Equivalent-SAS-Functions-Needed-to-Replace-Teradata-Functions/m-p/579780#M164633</guid>
      <dc:creator>hashman</dc:creator>
      <dc:date>2019-08-08T03:16:47Z</dc:date>
    </item>
  </channel>
</rss>

