<?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 Oracle REGEXP_SUBSTR in SAS in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Oracle-REGEXP-SUBSTR-in-SAS/m-p/698137#M213479</link>
    <description>&lt;P&gt;Hi SAS users,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I have data coming like this in procedure code field - 1234|2345|4567 for a claim. I want to change make this to multiple lines by splitting the procedure codes pipes.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;U&gt;&lt;STRONG&gt;Original data&amp;nbsp; :&lt;/STRONG&gt;&lt;/U&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;clm&amp;nbsp; &amp;nbsp; procedure_code&lt;/P&gt;
&lt;P&gt;1&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;1234|2345|4567&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;U&gt;&lt;STRONG&gt;Needed format :&lt;/STRONG&gt;&lt;/U&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;clm&amp;nbsp; procedure_code&lt;/P&gt;
&lt;P&gt;1&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;1234&lt;/P&gt;
&lt;P&gt;1&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 2345&lt;/P&gt;
&lt;P&gt;1&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 4567&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thanks,&lt;/P&gt;
&lt;P&gt;Deepa&lt;/P&gt;</description>
    <pubDate>Wed, 11 Nov 2020 13:14:08 GMT</pubDate>
    <dc:creator>SASAna</dc:creator>
    <dc:date>2020-11-11T13:14:08Z</dc:date>
    <item>
      <title>Oracle REGEXP_SUBSTR in SAS</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Oracle-REGEXP-SUBSTR-in-SAS/m-p/698137#M213479</link>
      <description>&lt;P&gt;Hi SAS users,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I have data coming like this in procedure code field - 1234|2345|4567 for a claim. I want to change make this to multiple lines by splitting the procedure codes pipes.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;U&gt;&lt;STRONG&gt;Original data&amp;nbsp; :&lt;/STRONG&gt;&lt;/U&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;clm&amp;nbsp; &amp;nbsp; procedure_code&lt;/P&gt;
&lt;P&gt;1&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;1234|2345|4567&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;U&gt;&lt;STRONG&gt;Needed format :&lt;/STRONG&gt;&lt;/U&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;clm&amp;nbsp; procedure_code&lt;/P&gt;
&lt;P&gt;1&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;1234&lt;/P&gt;
&lt;P&gt;1&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 2345&lt;/P&gt;
&lt;P&gt;1&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 4567&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thanks,&lt;/P&gt;
&lt;P&gt;Deepa&lt;/P&gt;</description>
      <pubDate>Wed, 11 Nov 2020 13:14:08 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Oracle-REGEXP-SUBSTR-in-SAS/m-p/698137#M213479</guid>
      <dc:creator>SASAna</dc:creator>
      <dc:date>2020-11-11T13:14:08Z</dc:date>
    </item>
    <item>
      <title>Re: Oracle REGEXP_SUBSTR in SAS</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Oracle-REGEXP-SUBSTR-in-SAS/m-p/698139#M213480</link>
      <description>&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data have;
input clm procedure_code $30.;
datalines;
1 1234|2345|4567 
;

data want;
   set have;
   do i = 1 to countw(procedure_code, '|');
      p_code = scan(procedure_code, i, '|');
      output;
   end;
   drop procedure_code i;
run;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Wed, 11 Nov 2020 13:21:06 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Oracle-REGEXP-SUBSTR-in-SAS/m-p/698139#M213480</guid>
      <dc:creator>PeterClemmensen</dc:creator>
      <dc:date>2020-11-11T13:21:06Z</dc:date>
    </item>
    <item>
      <title>Re: Oracle REGEXP_SUBSTR in SAS</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Oracle-REGEXP-SUBSTR-in-SAS/m-p/698141#M213481</link>
      <description>Hi Deepa, &lt;BR /&gt;   Here is a simple solution example if the data that you mentioned is static and always starts and stops in the same position within the original data in procedure_code. If it doesn't then we would need to modify the code to make it more flexible. &lt;BR /&gt;&lt;BR /&gt;data orgdata;&lt;BR /&gt;   infile cards;&lt;BR /&gt;   input clm pro_code $14.;&lt;BR /&gt;&lt;BR /&gt;cards;&lt;BR /&gt;1 1234|2345|4567 &lt;BR /&gt;;&lt;BR /&gt;run;&lt;BR /&gt;&lt;BR /&gt;Data newfmt(drop=pro_code);&lt;BR /&gt;	set orgdata;&lt;BR /&gt;	procedure_code=substr(pro_code,1,4);&lt;BR /&gt;	output;&lt;BR /&gt;	procedure_code=substr(pro_code,6,4);&lt;BR /&gt;	output;&lt;BR /&gt;	procedure_code=substr(pro_code,11,4);&lt;BR /&gt;	output;&lt;BR /&gt; run;</description>
      <pubDate>Wed, 11 Nov 2020 13:27:55 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Oracle-REGEXP-SUBSTR-in-SAS/m-p/698141#M213481</guid>
      <dc:creator>CarmineVerrell</dc:creator>
      <dc:date>2020-11-11T13:27:55Z</dc:date>
    </item>
  </channel>
</rss>

