<?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: find notprintable string in data in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/find-notprintable-string-in-data/m-p/463231#M117982</link>
    <description>&lt;P&gt;Random words, ahve no idea.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Functions work anywhere in arrays, or loops, anywhere in datastep.&amp;nbsp; Provide test data in the form of a datastep, show what the output should look like, explain the logic between the two.&lt;/P&gt;
&lt;PRE&gt;data test;
  input name $32.;
  do i=1 to lengthn(name);
    rank_value=rank(char(name,i));
    output;
  end;
datalines;
RÃm
John
èra
©kumara
¶cris
;
run;&lt;/PRE&gt;
&lt;P&gt;That might not actually do what you want however, try it out.&amp;nbsp; Some other possiblities:&lt;/P&gt;
&lt;P&gt;&lt;A href="http://www.sascommunity.org/planet/blog/category/rank/" target="_blank"&gt;http://www.sascommunity.org/planet/blog/category/rank/&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;29May example, shows compress removing specials, but you could reverse it with:&lt;/P&gt;
&lt;PRE&gt;data want;
  set have;
  if lengthn(compress(name," ","ad"))&amp;gt;0 then result="special character";
run;&lt;/PRE&gt;
&lt;P&gt;So remove the alaph and numerics then if the lengthn is greater than 0 you know you have odd characters.&lt;/P&gt;</description>
    <pubDate>Fri, 18 May 2018 07:30:49 GMT</pubDate>
    <dc:creator>RW9</dc:creator>
    <dc:date>2018-05-18T07:30:49Z</dc:date>
    <item>
      <title>find notprintable string in data</title>
      <link>https://communities.sas.com/t5/SAS-Programming/find-notprintable-string-in-data/m-p/463215#M117970</link>
      <description>&lt;P&gt;hello experts,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I need a help to solve a query. I have a dataset and column called&amp;nbsp;&lt;STRONG&gt;NAME&lt;/STRONG&gt; but this column Name has some kind of encoding data like .&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I want to check which row has encoding data of ASC value which is falling between 161 to 255.&lt;/P&gt;&lt;P&gt;Suppose if you below code and data , so it should check each observation each string and identify the each string ASC value&amp;nbsp; and if any ASC value in observation is falling between 161 to 255, then a new column&amp;nbsp;&lt;STRONG&gt;RANK_VALUE&lt;/STRONG&gt; should give result of ASC Value,&lt;/P&gt;&lt;P&gt;if no value from 161 to 255, then null should pass.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data test;
input name $32.;
datalines;
RÃm
John
èra
©kumara
¶cris
;
run;&lt;/CODE&gt;&lt;/PRE&gt;&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;output :


Name   Rank_value

RÃm       195
John
èra       232
©kumara    169
¶cris       182&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Fri, 18 May 2018 06:33:25 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/find-notprintable-string-in-data/m-p/463215#M117970</guid>
      <dc:creator>Riteshdell</dc:creator>
      <dc:date>2018-05-18T06:33:25Z</dc:date>
    </item>
    <item>
      <title>Re: find notprintable string in data</title>
      <link>https://communities.sas.com/t5/SAS-Programming/find-notprintable-string-in-data/m-p/463224#M117976</link>
      <description>&lt;P&gt;And have you tried the rank procedure:&lt;/P&gt;
&lt;P&gt;&lt;A href="http://support.sas.com/documentation/cdl/en/lrdict/64316/HTML/default/viewer.htm#a000212189.htm" target="_blank"&gt;http://support.sas.com/documentation/cdl/en/lrdict/64316/HTML/default/viewer.htm#a000212189.htm&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 18 May 2018 07:12:48 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/find-notprintable-string-in-data/m-p/463224#M117976</guid>
      <dc:creator>RW9</dc:creator>
      <dc:date>2018-05-18T07:12:48Z</dc:date>
    </item>
    <item>
      <title>Re: find notprintable string in data</title>
      <link>https://communities.sas.com/t5/SAS-Programming/find-notprintable-string-in-data/m-p/463227#M117979</link>
      <description>rank procedure I ahev idea, but here each string we need to check . with array and loop we need to find out</description>
      <pubDate>Fri, 18 May 2018 07:18:39 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/find-notprintable-string-in-data/m-p/463227#M117979</guid>
      <dc:creator>Riteshdell</dc:creator>
      <dc:date>2018-05-18T07:18:39Z</dc:date>
    </item>
    <item>
      <title>Re: find notprintable string in data</title>
      <link>https://communities.sas.com/t5/SAS-Programming/find-notprintable-string-in-data/m-p/463231#M117982</link>
      <description>&lt;P&gt;Random words, ahve no idea.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Functions work anywhere in arrays, or loops, anywhere in datastep.&amp;nbsp; Provide test data in the form of a datastep, show what the output should look like, explain the logic between the two.&lt;/P&gt;
&lt;PRE&gt;data test;
  input name $32.;
  do i=1 to lengthn(name);
    rank_value=rank(char(name,i));
    output;
  end;
datalines;
RÃm
John
èra
©kumara
¶cris
;
run;&lt;/PRE&gt;
&lt;P&gt;That might not actually do what you want however, try it out.&amp;nbsp; Some other possiblities:&lt;/P&gt;
&lt;P&gt;&lt;A href="http://www.sascommunity.org/planet/blog/category/rank/" target="_blank"&gt;http://www.sascommunity.org/planet/blog/category/rank/&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;29May example, shows compress removing specials, but you could reverse it with:&lt;/P&gt;
&lt;PRE&gt;data want;
  set have;
  if lengthn(compress(name," ","ad"))&amp;gt;0 then result="special character";
run;&lt;/PRE&gt;
&lt;P&gt;So remove the alaph and numerics then if the lengthn is greater than 0 you know you have odd characters.&lt;/P&gt;</description>
      <pubDate>Fri, 18 May 2018 07:30:49 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/find-notprintable-string-in-data/m-p/463231#M117982</guid>
      <dc:creator>RW9</dc:creator>
      <dc:date>2018-05-18T07:30:49Z</dc:date>
    </item>
  </channel>
</rss>

