<?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: EG code, removing the &amp;quot;DR&amp;quot;, MISS&amp;quot; FROM A SAS VARIABLE in SAS Enterprise Guide</title>
    <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/EG-code-removing-the-quot-DR-quot-MISS-quot-FROM-A-SAS-VARIABLE/m-p/364224#M23890</link>
    <description>&lt;P&gt;hi thanks for the detailed code...&lt;/P&gt;&lt;P&gt;by using this techiique not gettign the right soultion stil..&lt;/P&gt;&lt;P&gt;some how the previous solution better ..&lt;/P&gt;</description>
    <pubDate>Mon, 05 Jun 2017 08:26:11 GMT</pubDate>
    <dc:creator>vallsas</dc:creator>
    <dc:date>2017-06-05T08:26:11Z</dc:date>
    <item>
      <title>EG code, removing the "DR", MISS" FROM A SAS VARIABLE</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/EG-code-removing-the-quot-DR-quot-MISS-quot-FROM-A-SAS-VARIABLE/m-p/361524#M23761</link>
      <description>&lt;P&gt;HI,&lt;/P&gt;&lt;P&gt;I have a variable name which contains&lt;/P&gt;&lt;P&gt;DR JAMES KINDY&lt;/P&gt;&lt;P&gt;MISS JUME ALFINE&lt;/P&gt;&lt;P&gt;MA JOSEPH ABRAM LINKCON&lt;/P&gt;&lt;P&gt;HAROID KINDERSON GEORGE&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;From the abvoe line i want to remove only DR,MISS , MA and create a new Variable with Full name except the designations.&amp;nbsp;&lt;/P&gt;&lt;P&gt;like below:&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;JAMES KINDY&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;JUME ALFINE&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;JOSEPH ABRAM LINKCON&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;HAROID KINDERSON GEORGE&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;If I apply tranwrd fuction it will remove only last value called "MA" &amp;nbsp;not other two values, also in the same value where ever MA is it is removing from String value.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;any best solution&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 25 May 2017 10:33:51 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/EG-code-removing-the-quot-DR-quot-MISS-quot-FROM-A-SAS-VARIABLE/m-p/361524#M23761</guid>
      <dc:creator>vallsas</dc:creator>
      <dc:date>2017-05-25T10:33:51Z</dc:date>
    </item>
    <item>
      <title>Re: EG code, removing the "DR", MISS" FROM A SAS VARIABLE</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/EG-code-removing-the-quot-DR-quot-MISS-quot-FROM-A-SAS-VARIABLE/m-p/361534#M23763</link>
      <description>&lt;P&gt;Please try perl regular expression&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data have;
infile cards missover;
input Name &amp;amp;$100.;
newname=strip(prxchange('s/\bDR\b|\bMISS\b|MA\b//',-1,name));
cards;
DR JAMES KINDY
MISS JUME ALFINE
MA JOSEPH ABRAM LINKCON
HAROID KINDERSON GEORGE
;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Thu, 25 May 2017 11:39:00 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/EG-code-removing-the-quot-DR-quot-MISS-quot-FROM-A-SAS-VARIABLE/m-p/361534#M23763</guid>
      <dc:creator>Jagadishkatam</dc:creator>
      <dc:date>2017-05-25T11:39:00Z</dc:date>
    </item>
    <item>
      <title>Re: EG code, removing the "DR", MISS" FROM A SAS VARIABLE</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/EG-code-removing-the-quot-DR-quot-MISS-quot-FROM-A-SAS-VARIABLE/m-p/361842#M23777</link>
      <description>&lt;P&gt;I hope it will help you&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;DATA HAVE;&lt;BR /&gt;INPUT NAME $20.;&lt;BR /&gt;DATALINES;&lt;BR /&gt;DR JOHN DAS&lt;BR /&gt;MISS ANNA RAFT&lt;BR /&gt;MA MIC JAG&lt;BR /&gt;JAGA TOOMBA YUOMBA&lt;BR /&gt;;&lt;BR /&gt;RUN;&lt;/P&gt;&lt;P&gt;DATA WANT;&lt;BR /&gt;SET HAVE;&lt;/P&gt;&lt;P&gt;DO;&lt;BR /&gt;NV=TRANWRD(NAME,'DR ','');&lt;BR /&gt;NV=TRANWRD(NV,'MISS ','');&lt;BR /&gt;NV=TRANWRD(NV,'MA ','');&lt;BR /&gt;IF FIND(NV,'')=1 THEN NV=SUBSTR(NV,2,LENGTH(NV));&lt;BR /&gt;OUTPUT;&lt;BR /&gt;END;&lt;/P&gt;&lt;P&gt;RUN;&lt;/P&gt;</description>
      <pubDate>Fri, 26 May 2017 02:58:36 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/EG-code-removing-the-quot-DR-quot-MISS-quot-FROM-A-SAS-VARIABLE/m-p/361842#M23777</guid>
      <dc:creator>kanivan51</dc:creator>
      <dc:date>2017-05-26T02:58:36Z</dc:date>
    </item>
    <item>
      <title>Re: EG code, removing the "DR", MISS" FROM A SAS VARIABLE</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/EG-code-removing-the-quot-DR-quot-MISS-quot-FROM-A-SAS-VARIABLE/m-p/362264#M23784</link>
      <description>&lt;P&gt;hi Jag,&lt;/P&gt;&lt;P&gt;this is excellent ..brillient..great its works.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have one small concern on the same, the data also contains middle name with DR. dont want to remove this. only in the begging of the string only need to remove any clue.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sun, 28 May 2017 04:39:17 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/EG-code-removing-the-quot-DR-quot-MISS-quot-FROM-A-SAS-VARIABLE/m-p/362264#M23784</guid>
      <dc:creator>vallsas</dc:creator>
      <dc:date>2017-05-28T04:39:17Z</dc:date>
    </item>
    <item>
      <title>Re: EG code, removing the "DR", MISS" FROM A SAS VARIABLE</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/EG-code-removing-the-quot-DR-quot-MISS-quot-FROM-A-SAS-VARIABLE/m-p/362266#M23785</link>
      <description>&lt;P&gt;hi kanivan,&lt;/P&gt;&lt;P&gt;great to see the solution , this code is working.&lt;/P&gt;&lt;P&gt;only thing is if two times repeats the same string DR in the begging and middile DR , need to remove the DR ony in the begging .&lt;/P&gt;&lt;P&gt;any idea. thank you very much ..&lt;/P&gt;</description>
      <pubDate>Sun, 28 May 2017 05:08:30 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/EG-code-removing-the-quot-DR-quot-MISS-quot-FROM-A-SAS-VARIABLE/m-p/362266#M23785</guid>
      <dc:creator>vallsas</dc:creator>
      <dc:date>2017-05-28T05:08:30Z</dc:date>
    </item>
    <item>
      <title>Re: EG code, removing the "DR", MISS" FROM A SAS VARIABLE</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/EG-code-removing-the-quot-DR-quot-MISS-quot-FROM-A-SAS-VARIABLE/m-p/362306#M23787</link>
      <description>&lt;P&gt;Please try the below code&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;newname=strip(prxchange('s/\bDR\s\b|\bMISS\s\b|MA\s\b//',-1,name));&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Also, please mark the answer which was helpful to you. I see you have marked your response as answer.&lt;/P&gt;</description>
      <pubDate>Sun, 28 May 2017 16:43:58 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/EG-code-removing-the-quot-DR-quot-MISS-quot-FROM-A-SAS-VARIABLE/m-p/362306#M23787</guid>
      <dc:creator>Jagadishkatam</dc:creator>
      <dc:date>2017-05-28T16:43:58Z</dc:date>
    </item>
    <item>
      <title>Re: EG code, removing the "DR", MISS" FROM A SAS VARIABLE</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/EG-code-removing-the-quot-DR-quot-MISS-quot-FROM-A-SAS-VARIABLE/m-p/362371#M23794</link>
      <description>&lt;P&gt;Hi, vallsas!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;DATA HAVE;&lt;BR /&gt;INPUT NAME $20.;&lt;BR /&gt;DATALINES;&lt;BR /&gt;DR JOHN DAS&lt;BR /&gt;DR JOHNDR DAS&lt;BR /&gt;DR JOHN DRDAS&lt;BR /&gt;DR JOHN DR DRDAS&lt;BR /&gt;MISS ANNAMISS RAFT&lt;BR /&gt;MISS ANNA MISSRAFT&lt;BR /&gt;MISS ANNA MISS RAFT&lt;BR /&gt;MA MIC JAG&lt;BR /&gt;MA MICMA JAG&lt;BR /&gt;MA MIC MAJAG&lt;BR /&gt;MA MIC MA JAG&lt;BR /&gt;JAGA TOOMBA YUOMBA&lt;BR /&gt;;&lt;BR /&gt;RUN;&lt;BR /&gt;DATA WANT;&lt;BR /&gt;SET HAVE;&lt;BR /&gt;DO;&lt;BR /&gt;NV=TRANWRD(NAME,'DR ','');&lt;BR /&gt;NV=TRANWRD(NV,'MISS ','');&lt;BR /&gt;NV=TRANWRD(NV,'MA ','');&lt;BR /&gt;IF FIND(NV,'')=1 THEN NV=SUBSTR(NV,2,LENGTH(NV));&lt;BR /&gt;&lt;FONT color="#FF6600"&gt;IF SUBSTR(NAME,1,3)='DR ' THEN NV_SUBSTR=SUBSTR(NAME,4,LENGTH(NAME));&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT color="#FF6600"&gt;ELSE IF SUBSTR(NAME,1,5)='MISS ' THEN NV_SUBSTR=SUBSTR(NAME,6,LENGTH(NAME));&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT color="#FF6600"&gt;ELSE IF SUBSTR(NAME,1,3)='MA ' THEN NV_SUBSTR=SUBSTR(NAME,4,LENGTH(NAME));&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT color="#FF6600"&gt;ELSE NV_SUBSTR=NAME;&lt;/FONT&gt;&lt;BR /&gt;OUTPUT;&lt;BR /&gt;END;&lt;BR /&gt;RUN;&lt;/P&gt;</description>
      <pubDate>Sun, 28 May 2017 22:36:59 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/EG-code-removing-the-quot-DR-quot-MISS-quot-FROM-A-SAS-VARIABLE/m-p/362371#M23794</guid>
      <dc:creator>kanivan51</dc:creator>
      <dc:date>2017-05-28T22:36:59Z</dc:date>
    </item>
    <item>
      <title>Re: EG code, removing the "DR", MISS" FROM A SAS VARIABLE</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/EG-code-removing-the-quot-DR-quot-MISS-quot-FROM-A-SAS-VARIABLE/m-p/362442#M23802</link>
      <description>&lt;P&gt;hi jag,&lt;/P&gt;&lt;P&gt;this is scripit is not working , as it was removing everying ..&lt;/P&gt;</description>
      <pubDate>Mon, 29 May 2017 08:45:42 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/EG-code-removing-the-quot-DR-quot-MISS-quot-FROM-A-SAS-VARIABLE/m-p/362442#M23802</guid>
      <dc:creator>vallsas</dc:creator>
      <dc:date>2017-05-29T08:45:42Z</dc:date>
    </item>
    <item>
      <title>Re: EG code, removing the "DR", MISS" FROM A SAS VARIABLE</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/EG-code-removing-the-quot-DR-quot-MISS-quot-FROM-A-SAS-VARIABLE/m-p/362470#M23803</link>
      <description>&lt;P&gt;I tested this script and its working fine. Please find the output I got.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data have;
infile cards missover;
input Name &amp;amp;$100.;
newname=strip(prxchange('s/\bDR\s\b|\bMISS\s\b|MA\s\b//',-1,name));
cards;
DR JAMES DR. KINDY
MISS JUME ALFINE
MA JOSEPH ABRAM LINKCON
HAROID KINDERSON GEORGE
;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;OUTPUT:&lt;/P&gt;
&lt;P&gt;&lt;IMG src="https://communities.sas.com/t5/image/serverpage/image-id/9117i5310DE847D58368E/image-size/original?v=1.0&amp;amp;px=-1" alt="Capture1.JPG" title="Capture1.JPG" border="0" /&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 29 May 2017 11:15:58 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/EG-code-removing-the-quot-DR-quot-MISS-quot-FROM-A-SAS-VARIABLE/m-p/362470#M23803</guid>
      <dc:creator>Jagadishkatam</dc:creator>
      <dc:date>2017-05-29T11:15:58Z</dc:date>
    </item>
    <item>
      <title>Re: EG code, removing the "DR", MISS" FROM A SAS VARIABLE</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/EG-code-removing-the-quot-DR-quot-MISS-quot-FROM-A-SAS-VARIABLE/m-p/364224#M23890</link>
      <description>&lt;P&gt;hi thanks for the detailed code...&lt;/P&gt;&lt;P&gt;by using this techiique not gettign the right soultion stil..&lt;/P&gt;&lt;P&gt;some how the previous solution better ..&lt;/P&gt;</description>
      <pubDate>Mon, 05 Jun 2017 08:26:11 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/EG-code-removing-the-quot-DR-quot-MISS-quot-FROM-A-SAS-VARIABLE/m-p/364224#M23890</guid>
      <dc:creator>vallsas</dc:creator>
      <dc:date>2017-06-05T08:26:11Z</dc:date>
    </item>
    <item>
      <title>Re: EG code, removing the "DR", MISS" FROM A SAS VARIABLE</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/EG-code-removing-the-quot-DR-quot-MISS-quot-FROM-A-SAS-VARIABLE/m-p/364226#M23891</link>
      <description>&lt;P&gt;hi jag,&lt;/P&gt;&lt;P&gt;the only problem on the below code is it will not supress the DR. in the middile of the name,&lt;/P&gt;&lt;P&gt;where as the first record we have two DR , the begging DR removed but middile DR also should be removed.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;as per the code we are searchign in the starting of the string any of the special characters(dr,mr,miss) and removing and some times they also apper in the middile of the name.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 05 Jun 2017 08:30:31 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/EG-code-removing-the-quot-DR-quot-MISS-quot-FROM-A-SAS-VARIABLE/m-p/364226#M23891</guid>
      <dc:creator>vallsas</dc:creator>
      <dc:date>2017-06-05T08:30:31Z</dc:date>
    </item>
  </channel>
</rss>

