<?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 Scan string in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Scan-string/m-p/63663#M13845</link>
    <description>Hi all, &lt;BR /&gt;
&lt;BR /&gt;
I need to scan a column to find all the chacters within each string. The data is in hindi so they are all double byte characters. So what I need is really all the Hindi characters used on the column. I need a way of scan each string row and find the double byte character then output that chracter and then move on to the next character and so on...&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
Thanks in advance</description>
    <pubDate>Tue, 02 Mar 2010 18:06:21 GMT</pubDate>
    <dc:creator>sasbegginer</dc:creator>
    <dc:date>2010-03-02T18:06:21Z</dc:date>
    <item>
      <title>Scan string</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Scan-string/m-p/63663#M13845</link>
      <description>Hi all, &lt;BR /&gt;
&lt;BR /&gt;
I need to scan a column to find all the chacters within each string. The data is in hindi so they are all double byte characters. So what I need is really all the Hindi characters used on the column. I need a way of scan each string row and find the double byte character then output that chracter and then move on to the next character and so on...&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
Thanks in advance</description>
      <pubDate>Tue, 02 Mar 2010 18:06:21 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Scan-string/m-p/63663#M13845</guid>
      <dc:creator>sasbegginer</dc:creator>
      <dc:date>2010-03-02T18:06:21Z</dc:date>
    </item>
    <item>
      <title>Re: Scan string</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Scan-string/m-p/63664#M13846</link>
      <description>Suggest you review the SAS National Language Support (NLS) companion documentation.  I expect you can use the SUBSTR function in a DO loop UNTIL you reach the LENGTH (function) of the SAS CHARACTER type variable.&lt;BR /&gt;
&lt;BR /&gt;
Scott Barry&lt;BR /&gt;
SBBWorks, Inc.&lt;BR /&gt;
&lt;BR /&gt;
Recommended Google advanced search argument, this topic/post:&lt;BR /&gt;
&lt;BR /&gt;
sas national language support dbcs unicode site:sas.com</description>
      <pubDate>Tue, 02 Mar 2010 18:12:46 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Scan-string/m-p/63664#M13846</guid>
      <dc:creator>sbb</dc:creator>
      <dc:date>2010-03-02T18:12:46Z</dc:date>
    </item>
    <item>
      <title>Re: Scan string</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Scan-string/m-p/63665#M13847</link>
      <description>My sas is already setup to view the characters, but im not sure i would extract all the characters from the string....for exmaple&lt;BR /&gt;
&lt;BR /&gt;
_row_&lt;BR /&gt;
abcdefgh&lt;BR /&gt;
&lt;BR /&gt;
output should be&lt;BR /&gt;
a&lt;BR /&gt;
b&lt;BR /&gt;
c&lt;BR /&gt;
d&lt;BR /&gt;
e&lt;BR /&gt;
g&lt;BR /&gt;
h&lt;BR /&gt;
&lt;BR /&gt;
remember in reality these are doubly byte characters. Thanks</description>
      <pubDate>Tue, 02 Mar 2010 18:29:19 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Scan-string/m-p/63665#M13847</guid>
      <dc:creator>sasbegginer</dc:creator>
      <dc:date>2010-03-02T18:29:19Z</dc:date>
    </item>
    <item>
      <title>Re: Scan string</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Scan-string/m-p/63666#M13848</link>
      <description>What is _row_?  Maybe a SAS column/variable?  Definitely, I expect you can easily parse the SAS character variable using SUBSTR function, creating individual character variables/columns, as you require, also to generate individual observations within a DO / END using some IF &lt;EXPRESSION&gt; THEN OUTPUT;   logic within the DO/END paragraph, as suggested previously.&lt;BR /&gt;
&lt;BR /&gt;
A straightforward DATA step program should accomplish the task as you have described.&lt;BR /&gt;
&lt;BR /&gt;
Scott Barry&lt;BR /&gt;
SBBWorks, Inc.&lt;/EXPRESSION&gt;</description>
      <pubDate>Tue, 02 Mar 2010 18:44:55 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Scan-string/m-p/63666#M13848</guid>
      <dc:creator>sbb</dc:creator>
      <dc:date>2010-03-02T18:44:55Z</dc:date>
    </item>
    <item>
      <title>Re: Scan string</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Scan-string/m-p/63667#M13849</link>
      <description>The "K" functions can be used to manipulated strings where a character may take more than one byte.  For instance, you could use KLENGTH to get the length of the string, then pick characters out of the string with KSUBSTR in a loop.  A log snippet showing this is at the bottom of this post.&lt;BR /&gt;
&lt;BR /&gt;
Jason&lt;BR /&gt;
&lt;BR /&gt;
[pre]&lt;BR /&gt;
19         data _null_;&lt;BR /&gt;
20           text = 'abcdef';&lt;BR /&gt;
21           do i = 1 to klength(text);&lt;BR /&gt;
22             c = ksubstr(text, i, 1);&lt;BR /&gt;
23             put c;&lt;BR /&gt;
24           end;&lt;BR /&gt;
25         run;&lt;BR /&gt;
&lt;BR /&gt;
a&lt;BR /&gt;
b&lt;BR /&gt;
c&lt;BR /&gt;
d&lt;BR /&gt;
e&lt;BR /&gt;
f&lt;BR /&gt;
[/pre]</description>
      <pubDate>Fri, 05 Mar 2010 21:42:36 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Scan-string/m-p/63667#M13849</guid>
      <dc:creator>JasonS_SAS</dc:creator>
      <dc:date>2010-03-05T21:42:36Z</dc:date>
    </item>
  </channel>
</rss>

