<?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: Hide the name inside the text in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Hide-the-name-inside-the-text/m-p/321949#M71159</link>
    <description>&lt;P&gt;Dear Art297;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp; Is there away to hide any Name's &amp;nbsp;and title from the comments. Sometimes I dont have the first and last name and they can add any names inside the comments column. How can I hide if they type any Name.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks.&lt;/P&gt;</description>
    <pubDate>Mon, 02 Jan 2017 15:12:57 GMT</pubDate>
    <dc:creator>tekish</dc:creator>
    <dc:date>2017-01-02T15:12:57Z</dc:date>
    <item>
      <title>Hide the name inside the text</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Hide-the-name-inside-the-text/m-p/321836#M71130</link>
      <description>&lt;P&gt;Dear Expert.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have &amp;nbsp;a table with Comments column which contains Names. I want to hide the names from the comments.&lt;/P&gt;&lt;P&gt;Here is sample table and desired out put.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The actual Table&lt;/P&gt;&lt;TABLE&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD&gt;&lt;P&gt;firsname&lt;/P&gt;&lt;/TD&gt;&lt;TD&gt;&lt;P&gt;lastname&lt;/P&gt;&lt;/TD&gt;&lt;TD&gt;&lt;P&gt;comments&lt;/P&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;&lt;P&gt;George&lt;/P&gt;&lt;/TD&gt;&lt;TD&gt;&lt;P&gt;John&lt;/P&gt;&lt;/TD&gt;&lt;TD&gt;&lt;P&gt;George John is drug addicted&lt;/P&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;&lt;P&gt;James&lt;/P&gt;&lt;/TD&gt;&lt;TD&gt;&lt;P&gt;Bond&lt;/P&gt;&lt;/TD&gt;&lt;TD&gt;&lt;P&gt;Mr. Bond is not cooperating guy&lt;/P&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;&lt;P&gt;Rachel&lt;/P&gt;&lt;/TD&gt;&lt;TD&gt;&lt;P&gt;Bob&lt;/P&gt;&lt;/TD&gt;&lt;TD&gt;&lt;P&gt;Rachel is not a team leader&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/P&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Desired Out put&lt;/P&gt;&lt;TABLE&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD&gt;&lt;P&gt;firsname&lt;/P&gt;&lt;/TD&gt;&lt;TD&gt;&lt;P&gt;lastname&lt;/P&gt;&lt;/TD&gt;&lt;TD&gt;&lt;P&gt;comments&lt;/P&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;&lt;P&gt;George&lt;/P&gt;&lt;/TD&gt;&lt;TD&gt;&lt;P&gt;John&lt;/P&gt;&lt;/TD&gt;&lt;TD&gt;&lt;P&gt;XXXXXX is drug addicted&lt;/P&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;&lt;P&gt;James&lt;/P&gt;&lt;/TD&gt;&lt;TD&gt;&lt;P&gt;Bond&lt;/P&gt;&lt;/TD&gt;&lt;TD&gt;&lt;P&gt;XXXXXXX is not Aacooperating guy&lt;/P&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;&lt;P&gt;Rachel&lt;/P&gt;&lt;/TD&gt;&lt;TD&gt;&lt;P&gt;Bob&lt;/P&gt;&lt;/TD&gt;&lt;TD&gt;&lt;P&gt;XXXXXXX is not a team leader&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/P&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;thanks&lt;/P&gt;</description>
      <pubDate>Sat, 31 Dec 2016 14:36:07 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Hide-the-name-inside-the-text/m-p/321836#M71130</guid>
      <dc:creator>tekish</dc:creator>
      <dc:date>2016-12-31T14:36:07Z</dc:date>
    </item>
    <item>
      <title>Re: Hide the name inside the text</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Hide-the-name-inside-the-text/m-p/321839#M71132</link>
      <description>&lt;P&gt;Hi:&lt;/P&gt;
&lt;P&gt;&amp;nbsp; Something like this should do it. Once you understand how TRANWRD works, then you can get rid of Mr., Ms., Jr., etc using the same technique.&lt;/P&gt;
&lt;P&gt;cynthia&lt;/P&gt;
&lt;P&gt;&lt;IMG title="use_tranwrd.png" alt="use_tranwrd.png" src="https://communities.sas.com/t5/image/serverpage/image-id/6542i21D0BE75D41B259B/image-size/original?v=v2&amp;amp;px=-1" border="0" /&gt;&lt;/P&gt;</description>
      <pubDate>Sat, 31 Dec 2016 15:45:57 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Hide-the-name-inside-the-text/m-p/321839#M71132</guid>
      <dc:creator>Cynthia_sas</dc:creator>
      <dc:date>2016-12-31T15:45:57Z</dc:date>
    </item>
    <item>
      <title>Re: Hide the name inside the text</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Hide-the-name-inside-the-text/m-p/321864#M71134</link>
      <description>&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data have;
input firstname $
lastname $
comments &amp;amp; $20.;
cards;
George
John
George John is drug addicted
James
Bond
Mr. Bond is not cooperating guy
Rachel
Bob
Rachel is not a team leader   
;
run;
data want;
 set have;
 pid=cats('s/(Mr\.)?\s*\b(',firstname,'|',lastname,')\b/xxxxx/i');
 want=prxchange(pid,-1,comments);
 drop pid;
run;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Sun, 01 Jan 2017 03:16:33 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Hide-the-name-inside-the-text/m-p/321864#M71134</guid>
      <dc:creator>Ksharp</dc:creator>
      <dc:date>2017-01-01T03:16:33Z</dc:date>
    </item>
    <item>
      <title>Re: Hide the name inside the text</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Hide-the-name-inside-the-text/m-p/321898#M71139</link>
      <description>&lt;P&gt;While I found KSharp's approach quite interesting, it runs almost 30 times slower than Cynthia's approach.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I'm not sure why Cynthia added all of the checking conditions, as I don't think that they're necessary. &amp;nbsp;I think that something like the following will do what you want:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;data have;&lt;BR /&gt; informat firstname $15.;&lt;BR /&gt; informat lastname $15.;&lt;BR /&gt; informat comments $60.;&lt;BR /&gt; input firstname lastname comments &amp;amp;;&lt;BR /&gt; cards;&lt;BR /&gt;George John 1 George John is johndrug addicted&lt;BR /&gt;George John 2 The list of addicts includes George John&lt;BR /&gt;George John 3 The list of addicts includes Mr. George John&lt;BR /&gt;George John 4 The list of addicts includes Mr. George John and others&lt;BR /&gt;James Bond 5 Mr. Bond is not a cooperating guy&lt;BR /&gt;Rachel Bob 6 Rachel is not a team leader&lt;BR /&gt;Kim Jones 7 Mrs. Kim Jones isn't here&lt;BR /&gt;Kim Jones 8 Ms. Kim Jones isn't here&lt;BR /&gt;Kim Jones 9 Does Miss Kim Jones live here?&lt;BR /&gt;;&lt;/P&gt;
&lt;P&gt;data want (drop=_:);&lt;BR /&gt; length comments $80;&lt;BR /&gt; set have;&lt;BR /&gt; comments=tranwrd(comments, trim(firstname), "xxxxx");&lt;BR /&gt; comments=tranwrd(comments, trim(lastname), "xxxxx");&lt;BR /&gt; comments=tranwrd(comments, "Mr.", "xxxxx");&lt;BR /&gt; comments=tranwrd(comments, "Mrs.", "xxxxx");&lt;BR /&gt; comments=tranwrd(comments, "Ms.", "xxxxx");&lt;BR /&gt; comments=tranwrd(comments, "Miss", "xxxxx");&lt;BR /&gt; comments=tranwrd(comments, "Dr.", "xxxxx");&lt;BR /&gt; comments=tranwrd(tranwrd(comments, "xxxxx xxxxx", "xxxxx"), "xxxxx xxxxx", "xxxxx");&lt;BR /&gt;run;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Art, CEO, AnalystFinder.com&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 02 Jan 2017 05:31:43 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Hide-the-name-inside-the-text/m-p/321898#M71139</guid>
      <dc:creator>art297</dc:creator>
      <dc:date>2017-01-02T05:31:43Z</dc:date>
    </item>
    <item>
      <title>Re: Hide the name inside the text</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Hide-the-name-inside-the-text/m-p/321949#M71159</link>
      <description>&lt;P&gt;Dear Art297;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp; Is there away to hide any Name's &amp;nbsp;and title from the comments. Sometimes I dont have the first and last name and they can add any names inside the comments column. How can I hide if they type any Name.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks.&lt;/P&gt;</description>
      <pubDate>Mon, 02 Jan 2017 15:12:57 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Hide-the-name-inside-the-text/m-p/321949#M71159</guid>
      <dc:creator>tekish</dc:creator>
      <dc:date>2017-01-02T15:12:57Z</dc:date>
    </item>
    <item>
      <title>Re: Hide the name inside the text</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Hide-the-name-inside-the-text/m-p/321953#M71160</link>
      <description>&lt;P&gt;Here is some Python code that claims to accomplish the task:&amp;nbsp;&lt;A href="https://thetokenizer.com/2013/08/25/how-to-easily-recognize-peoples-names-in-a-text/" target="_blank"&gt;https://thetokenizer.com/2013/08/25/how-to-easily-recognize-peoples-names-in-a-text/&lt;/A&gt; . Of course, short of running Python, you could access the Wikipedia name file mentioned in the article, load the names in an array, and use either the in operator or find function.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Art, CEO, AnalystFinder.com&lt;/P&gt;</description>
      <pubDate>Mon, 02 Jan 2017 15:25:45 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Hide-the-name-inside-the-text/m-p/321953#M71160</guid>
      <dc:creator>art297</dc:creator>
      <dc:date>2017-01-02T15:25:45Z</dc:date>
    </item>
    <item>
      <title>Re: Hide the name inside the text</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Hide-the-name-inside-the-text/m-p/321972#M71162</link>
      <description>&lt;P&gt;Hi, Art:&lt;BR /&gt; You are correct, the checking additions are really not necessary. Neither is the creation of the NEWCOMMENT variable. However, I have been doing this a LONG time and sure as I would blank out the information in the COMMENT variable, some manager would come back to me and say, "Well, we really need to be able to have the managers and adminstrators see the real comment." And then I'd have to make NEWCOMMENT. Or else, they would say we don't ALWAYS want to blank out first name if it is John or Fred, thus requiring some kind of IF condition. So I generally try to write code that has some hope of surviving the first assault of changes.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp; And, I really didn't need X and Y either, but wanted a way for a newer programmer to be able to see what values were returned from those functions as separate variables just in case the request came for more refinements of the blanking out.&lt;BR /&gt;&lt;BR /&gt;cynthia&lt;/P&gt;</description>
      <pubDate>Mon, 02 Jan 2017 17:33:27 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Hide-the-name-inside-the-text/m-p/321972#M71162</guid>
      <dc:creator>Cynthia_sas</dc:creator>
      <dc:date>2017-01-02T17:33:27Z</dc:date>
    </item>
    <item>
      <title>Re: Hide the name inside the text</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Hide-the-name-inside-the-text/m-p/322051#M71199</link>
      <description>&lt;PRE&gt;
Arthur.T,
It is nice to meet  you here again.
I am really sorry that I have no time to visit SAS-L.

Cynthia's code has a fault. if name is not a word ,tranwrd will still change it , see this :
George John    George Johnis drug addicted

So although prxchange is slower but more flexible .
&lt;/PRE&gt;</description>
      <pubDate>Tue, 03 Jan 2017 02:50:21 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Hide-the-name-inside-the-text/m-p/322051#M71199</guid>
      <dc:creator>Ksharp</dc:creator>
      <dc:date>2017-01-03T02:50:21Z</dc:date>
    </item>
    <item>
      <title>Re: Hide the name inside the text</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Hide-the-name-inside-the-text/m-p/322062#M71208</link>
      <description>&lt;P&gt;Xia,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Nice to hear from you as well and Happy New Year! Actually, the way Cynthia originally proposed the code, it didn't have the limitation you mentioned.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Here is a revised version that corrects for the problem you mentioned AND still runs more than 30 time faster than the regular expression method:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;data want (drop=_:);&lt;BR /&gt;&amp;nbsp;length comments $80;&lt;BR /&gt;&amp;nbsp;set have;&lt;BR /&gt;&amp;nbsp;if findw(comments,trim(firstname)) then&lt;BR /&gt;&amp;nbsp; comments=tranwrd(comments, trim(firstname), "xxxxx");&lt;BR /&gt;&amp;nbsp;if findw(comments,trim(lastname)) then&lt;BR /&gt;&amp;nbsp; comments=tranwrd(comments, trim(lastname), "xxxxx");&lt;BR /&gt;&amp;nbsp;if findw(comments,"Mr.") then&lt;BR /&gt;&amp;nbsp; comments=tranwrd(comments, "Mr.", "xxxxx");&lt;BR /&gt;&amp;nbsp;if findw(comments,"Mrs.") then&lt;BR /&gt;&amp;nbsp; comments=tranwrd(comments, "Mrs.", "xxxxx");&lt;BR /&gt;&amp;nbsp;if findw(comments,"Ms.") then&lt;BR /&gt;&amp;nbsp; comments=tranwrd(comments, "Ms.", "xxxxx");&lt;BR /&gt;&amp;nbsp;if findw(comments,"Miss") then&lt;BR /&gt;&amp;nbsp; comments=tranwrd(comments, "Miss", "xxxxx");&lt;BR /&gt;&amp;nbsp;if findw(comments,"Dr.") then&lt;BR /&gt;&amp;nbsp; comments=tranwrd(comments, "Dr.", "xxxxx");&lt;BR /&gt;&amp;nbsp;comments=tranwrd(tranwrd(comments, "xxxxx xxxxx", "xxxxx"), "xxxxx xxxxx", "xxxxx");&lt;BR /&gt;run;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Art, CEO, AnalystFinder.com&lt;/P&gt;</description>
      <pubDate>Tue, 03 Jan 2017 04:40:23 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Hide-the-name-inside-the-text/m-p/322062#M71208</guid>
      <dc:creator>art297</dc:creator>
      <dc:date>2017-01-03T04:40:23Z</dc:date>
    </item>
    <item>
      <title>Re: Hide the name inside the text</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Hide-the-name-inside-the-text/m-p/323218#M71604</link>
      <description>&lt;P&gt;Xia,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Upon more thought, yes, the regex solution IS more precise. The last solution i offered won't work correctly if there are both desired and undesired instances within the same record, e.g.,&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;George John is Johnis drug addicted&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;Art, CEO, AnalystFinder.com&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sun, 08 Jan 2017 15:10:23 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Hide-the-name-inside-the-text/m-p/323218#M71604</guid>
      <dc:creator>art297</dc:creator>
      <dc:date>2017-01-08T15:10:23Z</dc:date>
    </item>
    <item>
      <title>Re: Hide the name inside the text</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Hide-the-name-inside-the-text/m-p/323312#M71649</link>
      <description>&lt;P&gt;Hi.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;If any name is possible at any place inside comments, I would suggest gathering all available names in a first pass and then with&amp;nbsp;a second pass doing all the substitutions based on this list.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;If you want, you can also add to the list any additional names.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;FONT face="courier new,courier"&gt;%let NAMES=MR. MRS. MS. MISS DR.; * add aditional names here, if needed;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;FONT face="courier new,courier"&gt;* first pass, gather every firstname and lastname into a list;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="courier new,courier"&gt;data _null_;&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;set have;&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;if not index(cat(' ',symget('NAMES'),' '),FIRSTNAME) then&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; call symput('NAMES',catx(' ',symget('NAMES'),upcase(FIRSTNAME)));&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;if not index(cat(' ',symget('NAMES'),' '),LASTNAME) then&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; call symput('NAMES',catx(' ',symget('NAMES'),upcase(LASTNAME)));&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;run;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;FONT face="courier new,courier"&gt;%put NAMES=&amp;amp;NAMES; * list names to mask;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;FONT face="courier new,courier"&gt;* second pass, mask names;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="courier new,courier"&gt;data want;&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;length _WORD $200&lt;/FONT&gt;&lt;FONT face="courier new,courier"&gt;&amp;nbsp;_SEP $1;&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;set have;&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;drop _:; * drop aux vars;&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;_COMMENTS=COMMENTS; _COMMENTS=''; _SEP=''; * init aux vars;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="courier new,courier"&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;* process one word;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="courier new,courier"&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;do _I=1 to countw(COMMENTS);&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; _COMMENTS=catx(_SEP,_COMMENTS,_WORD);&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; _WORD=scan(COMMENTS,_I,' ');&lt;/FONT&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; * if match, mask word; &lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="courier new,courier"&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; if index(" &amp;amp;NAMES ",cat(' ',strip(upcase(_WORD)),' ')) then do;&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;_WORD=repeat('X',lengthn(_WORD)-1);&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;_SEP='X'; &lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; end;&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; else _SEP=' '; * clear masking separator;&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;end;&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;COMMENTS=catx(_SEP,_COMMENTS,_WORD);&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;run;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;FONT face="arial,helvetica,sans-serif"&gt;&lt;SPAN&gt;Hope it helps.&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;FONT face="arial,helvetica,sans-serif"&gt;&lt;SPAN&gt;Daniel Santos&amp;nbsp;@ &lt;A href="http://www.cgd.pt" target="_blank"&gt;www.cgd.pt&lt;/A&gt;&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 09 Jan 2017 10:13:11 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Hide-the-name-inside-the-text/m-p/323312#M71649</guid>
      <dc:creator>Daniel-Santos</dc:creator>
      <dc:date>2017-01-09T10:13:11Z</dc:date>
    </item>
    <item>
      <title>Re: Hide the name inside the text</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Hide-the-name-inside-the-text/m-p/323355#M71660</link>
      <description>&lt;P&gt;Note to the solution above.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;There is 64KB limit for the list (macro variable).&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;If it is expected to go above that, the same code could&amp;nbsp;be easily modified to load the names into an hash table.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Hope it helps.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Daniel Santos&amp;nbsp;@ &lt;A href="http://www.cgd.pt" target="_blank"&gt;www.cgd.pt&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 09 Jan 2017 14:11:50 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Hide-the-name-inside-the-text/m-p/323355#M71660</guid>
      <dc:creator>Daniel-Santos</dc:creator>
      <dc:date>2017-01-09T14:11:50Z</dc:date>
    </item>
    <item>
      <title>Re: Hide the name inside the text</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Hide-the-name-inside-the-text/m-p/323387#M71666</link>
      <description>&lt;P&gt;Daniel-Santos,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The problem is i dont have any list of names and they can enter&amp;nbsp;as many names as&amp;nbsp;they want. How do I hide&amp;nbsp;the names when i dont have list of names.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;thanks,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 09 Jan 2017 15:42:06 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Hide-the-name-inside-the-text/m-p/323387#M71666</guid>
      <dc:creator>tekish</dc:creator>
      <dc:date>2017-01-09T15:42:06Z</dc:date>
    </item>
    <item>
      <title>Re: Hide the name inside the text</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Hide-the-name-inside-the-text/m-p/323396#M71669</link>
      <description>&lt;P&gt;Hi.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Well, if you are looking for some kind of function that will identy names and surnames for you, I'm sorry I don't know any that can do that.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;You'll have to priorly make the list youself.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Daniel Santos&amp;nbsp;@ &lt;A href="http://www.cgd.pt" target="_blank"&gt;www.cgd.pt&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 09 Jan 2017 16:10:07 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Hide-the-name-inside-the-text/m-p/323396#M71669</guid>
      <dc:creator>Daniel-Santos</dc:creator>
      <dc:date>2017-01-09T16:10:07Z</dc:date>
    </item>
    <item>
      <title>Re: Hide the name inside the text</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Hide-the-name-inside-the-text/m-p/323404#M71673</link>
      <description>&lt;P&gt;I haven't experimented with it myself, but the following R package looks like it might be able to identify people:&lt;/P&gt;
&lt;P&gt;&lt;A href="https://cran.r-project.org/web/packages/openNLP/openNLP.pdf" target="_blank"&gt;https://cran.r-project.org/web/packages/openNLP/openNLP.pdf&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If it can, you can run R from SAS/IML&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;HTH,&lt;/P&gt;
&lt;P&gt;Art, CEO, AnalystFinder.com&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 09 Jan 2017 16:30:45 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Hide-the-name-inside-the-text/m-p/323404#M71673</guid>
      <dc:creator>art297</dc:creator>
      <dc:date>2017-01-09T16:30:45Z</dc:date>
    </item>
  </channel>
</rss>

