<?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: How to read from a text in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/How-to-read-from-a-text/m-p/352382#M273783</link>
    <description>&lt;P&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/13879"&gt;@Reeza&lt;/a&gt;&lt;/P&gt;
&lt;P&gt;You mean it is &amp;nbsp;a compliment ?&lt;/P&gt;</description>
    <pubDate>Sat, 22 Apr 2017 03:19:48 GMT</pubDate>
    <dc:creator>Ksharp</dc:creator>
    <dc:date>2017-04-22T03:19:48Z</dc:date>
    <item>
      <title>How to read from a text</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-read-from-a-text/m-p/352013#M273773</link>
      <description>&lt;P&gt;I am working on a project that will help children learn faster/better. I have got a raw data file with some dictionary data. The follwong have and want may be self explanatory:&lt;BR /&gt;Mostly the data is created systematically. Here are some characteristics I have found which may help in programming:&lt;/P&gt;
&lt;P&gt;Word: Begin with no space&lt;BR /&gt;Pronounciation: in "(" and ")"&lt;/P&gt;
&lt;P&gt;Etymology: in "[" and "]"&lt;/P&gt;
&lt;P&gt;If pronounciation and etymology is given, the word is repeated for defintion&lt;BR /&gt;Defintion: start with a -space- character&lt;/P&gt;
&lt;P&gt;Examples: starts with a year&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Can someone please help? (Please see the screenshot for clarity)&lt;/P&gt;
&lt;P&gt;Jijil Ramakrishnan&lt;/P&gt;&lt;BR /&gt;&lt;IMG src="https://communities.sas.com/t5/image/serverpage/image-id/13731i15A09DA928E5A360/image-size/large?v=1.0&amp;amp;px=600" border="0" alt="Screenshot (19)_LI.jpg" title="Screenshot (19)_LI.jpg" /&gt;</description>
      <pubDate>Fri, 21 Apr 2017 04:24:45 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-read-from-a-text/m-p/352013#M273773</guid>
      <dc:creator>JAR</dc:creator>
      <dc:date>2017-04-21T04:24:45Z</dc:date>
    </item>
    <item>
      <title>Re: How to read from a text</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-read-from-a-text/m-p/352025#M273774</link>
      <description>&lt;P&gt;What is the question here?&lt;/P&gt;</description>
      <pubDate>Fri, 21 Apr 2017 04:15:36 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-read-from-a-text/m-p/352025#M273774</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2017-04-21T04:15:36Z</dc:date>
    </item>
    <item>
      <title>Re: How to read from a text</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-read-from-a-text/m-p/352029#M273775</link>
      <description>&lt;P&gt;Any suggestion to program this?&lt;/P&gt;</description>
      <pubDate>Fri, 21 Apr 2017 04:16:31 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-read-from-a-text/m-p/352029#M273775</guid>
      <dc:creator>JAR</dc:creator>
      <dc:date>2017-04-21T04:16:31Z</dc:date>
    </item>
    <item>
      <title>Re: How to read from a text</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-read-from-a-text/m-p/352033#M273776</link>
      <description>&lt;P&gt;Program what? You haven't explained what the question is or what you're trying to do. We can't read minds.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 21 Apr 2017 04:18:42 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-read-from-a-text/m-p/352033#M273776</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2017-04-21T04:18:42Z</dc:date>
    </item>
    <item>
      <title>Re: How to read from a text</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-read-from-a-text/m-p/352036#M273777</link>
      <description>&lt;P&gt;My bad. You wrote on the images. That wasn't clear at first.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thats going to need regular expressions which is not my forte.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 21 Apr 2017 04:20:22 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-read-from-a-text/m-p/352036#M273777</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2017-04-21T04:20:22Z</dc:date>
    </item>
    <item>
      <title>Re: How to read from a text</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-read-from-a-text/m-p/352188#M273778</link>
      <description>&lt;P&gt;That is really uneasy.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data x;
infile '/folders/myfolders/samplerawfile.txt' lrecl=32767 length=len;
input x $varying32767. len;
if missing(x) then delete;
run;
data temp;
 merge x x(firstobs=2 rename=(x=_x));
 if prxmatch('/^\(.+\)\[.+\]$/',strip(_x)) then group+1;
 drop _x;
run;

data temp;
 set temp;
 by group;
 length name temp $ 80;
 retain temp;
 if first.group then do; n=0;call missing(temp);end;
 n+1;
 if n=1 then do;name='word';temp=x;end;
  else if prxmatch('/^\(.+\)\[.+\]$/',strip(x)) then name='pronounce';
   else if prxmatch('/^[\w\p]+:/',strip(x)) then name='example';
    else name='meaning';
 if temp=x and n ne 1 then delete;
 drop temp n ;
run;
data temp;
 set temp;
 length _name $ 80;
 by group;
 if first.group then do;idx=0;n=0;end;
 if name='meaning' then do;
   idx+1;
   _name=catx('_',name,idx);
 end;
 drop n;
run;
data temp;
 set temp;
 by group idx notsorted;
 if first.idx then m=-1;
 m+1;
 if name='example' then _name=cats(cats('meaning',idx),'_',cats(name,m));
  else if missing(_name) then _name=name;
run;

proc transpose data=temp out=want;
by group;
id _name;
var x;
run;
proc print data=want(obs=50) noobs;run;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Fri, 21 Apr 2017 14:44:31 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-read-from-a-text/m-p/352188#M273778</guid>
      <dc:creator>Ksharp</dc:creator>
      <dc:date>2017-04-21T14:44:31Z</dc:date>
    </item>
    <item>
      <title>Re: How to read from a text</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-read-from-a-text/m-p/352275#M273779</link>
      <description>&lt;P&gt;I thank you very much, Mr. KSharp! You have done more than what I had requested. Is there any study indicating a correlation between knowledge and magnanimity? Thank you very much!&lt;/P&gt;</description>
      <pubDate>Fri, 21 Apr 2017 18:12:42 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-read-from-a-text/m-p/352275#M273779</guid>
      <dc:creator>JAR</dc:creator>
      <dc:date>2017-04-21T18:12:42Z</dc:date>
    </item>
    <item>
      <title>Re: How to read from a text</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-read-from-a-text/m-p/352378#M273780</link>
      <description>&lt;P&gt;I can not guarantee my code can get what you want.&lt;/P&gt;
&lt;P&gt;You need know what kind of rules you should take into account.&lt;/P&gt;
&lt;P&gt;For example.&lt;/P&gt;
&lt;P&gt;prxmatch('/^[\w\p]+/')&lt;/P&gt;
&lt;P&gt;also could change into&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;prxmatch('/^\w+/')&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;it is depended on your data.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;"&lt;SPAN&gt; Is there any study indicating a correlation between knowledge and magnanimity?"&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;You mean make some statistical model ?&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;Plz post it at Statisical forum .&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Sat, 22 Apr 2017 03:03:37 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-read-from-a-text/m-p/352378#M273780</guid>
      <dc:creator>Ksharp</dc:creator>
      <dc:date>2017-04-22T03:03:37Z</dc:date>
    </item>
    <item>
      <title>Re: How to read from a text</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-read-from-a-text/m-p/352380#M273781</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;"&lt;SPAN&gt; Is there any study indicating a correlation between knowledge and magnanimity?"&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;You mean make some statistical model ?&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;Plz post it at Statisical forum .&lt;/SPAN&gt;&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/18408"&gt;@Ksharp&lt;/a&gt;&amp;nbsp;I believe that was a complement of sorts, not a question. Smarter people are helpful &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Sat, 22 Apr 2017 03:08:25 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-read-from-a-text/m-p/352380#M273781</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2017-04-22T03:08:25Z</dc:date>
    </item>
    <item>
      <title>Re: How to read from a text</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-read-from-a-text/m-p/352381#M273782</link>
      <description>&lt;P&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/13879"&gt;@Reeza&lt;/a&gt;&lt;/P&gt;
&lt;P&gt;Actually , I don't know what OP means.&lt;/P&gt;
&lt;P&gt;I am considering about some category data analysis, such as contingency table analysis.&lt;/P&gt;</description>
      <pubDate>Sat, 22 Apr 2017 03:15:58 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-read-from-a-text/m-p/352381#M273782</guid>
      <dc:creator>Ksharp</dc:creator>
      <dc:date>2017-04-22T03:15:58Z</dc:date>
    </item>
    <item>
      <title>Re: How to read from a text</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-read-from-a-text/m-p/352382#M273783</link>
      <description>&lt;P&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/13879"&gt;@Reeza&lt;/a&gt;&lt;/P&gt;
&lt;P&gt;You mean it is &amp;nbsp;a compliment ?&lt;/P&gt;</description>
      <pubDate>Sat, 22 Apr 2017 03:19:48 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-read-from-a-text/m-p/352382#M273783</guid>
      <dc:creator>Ksharp</dc:creator>
      <dc:date>2017-04-22T03:19:48Z</dc:date>
    </item>
    <item>
      <title>Re: How to read from a text</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-read-from-a-text/m-p/352390#M273784</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/18408"&gt;@Ksharp&lt;/a&gt; wrote:&lt;BR /&gt;
&lt;P&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/13879"&gt;@Reeza&lt;/a&gt;&lt;/P&gt;
&lt;P&gt;You mean it is &amp;nbsp;a compliment ?&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;Yeah it's a compliment. Sorry, I misused the incorrect but similar sounding word. English is a great language sometimes.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sat, 22 Apr 2017 03:52:58 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-read-from-a-text/m-p/352390#M273784</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2017-04-22T03:52:58Z</dc:date>
    </item>
  </channel>
</rss>

