<?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: infile-input vs. Set in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/infile-input-vs-Set/m-p/169575#M32531</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;This is my earlier communication&lt;/P&gt;&lt;PRE __jive_macro_name="quote" class="jive_text_macro jive_macro_quote"&gt;
&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;Hi,&lt;/P&gt;
&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;I need help to read one url file into a varible called record.&lt;/P&gt;
&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;&amp;nbsp; &amp;lt;/h1&amp;gt;&amp;lt;br/&amp;gt;&amp;lt;h2 class="pageTitle entryTitle"&amp;gt;test&amp;lt;span class="homograph"&amp;gt;1&amp;lt;/span&amp;gt;&amp;lt;/h2&amp;gt;&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt; /*output:*/&lt;/P&gt;
&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;Record&lt;/P&gt;
&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;&amp;lt;/h1&amp;gt;&lt;/P&gt;
&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;&amp;lt;br/&amp;gt;&lt;/P&gt;
&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;&amp;lt;h2 class="pageTitle entryTitle"&amp;gt;&lt;/P&gt;
&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;test&lt;/P&gt;
&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;&amp;lt;span class="homograph"&amp;gt;&lt;/P&gt;
&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;1&lt;/P&gt;
&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;&amp;lt;/span&amp;gt;&lt;/P&gt;
&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;&amp;lt;/h2&amp;gt;&lt;/P&gt;
&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;&amp;nbsp; Ideally, I want only "test" and "1". If someone can help me to read either the whole items or non-html-tag portion it will be highly appreciated.&lt;/P&gt;
&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;&lt;/P&gt;
&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;Regards,&lt;/P&gt;
&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;Jijil&lt;/P&gt;
&lt;/PRE&gt;&lt;P&gt;(KSharp had helped me earlier with the code above, thanks to him)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This time, the raw html data is not in an html file, rather it is in sas under 'sasuser'.&lt;/P&gt;&lt;P&gt;Jijil&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 22 May 2014 19:52:40 GMT</pubDate>
    <dc:creator>JAR</dc:creator>
    <dc:date>2014-05-22T19:52:40Z</dc:date>
    <item>
      <title>infile-input vs. Set</title>
      <link>https://communities.sas.com/t5/SAS-Programming/infile-input-vs-Set/m-p/169573#M32529</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Dear All,&lt;/P&gt;&lt;P&gt;I would like to use the following code to read some data from a sas file:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE style="font-family: monospace;"&gt;
&lt;P&gt;data want; &lt;/P&gt;
&lt;P&gt;infile 'd:\temp\x.html' lrecl=20000 dsd dlm='&amp;lt;&amp;gt;'; &lt;/P&gt;
&lt;P&gt;input @'&amp;gt;' x : $200. @@; &lt;/P&gt;
&lt;P&gt;if not missing(x); &lt;/P&gt;
&lt;P&gt;run; &lt;/P&gt;
&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Instead of reading the same data from x.html file, I have the following SAS7bDat file under SASUser.x&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;How do I use the same code here:&lt;/P&gt;&lt;PRE style="font-family: monospace;"&gt;
&lt;P&gt;data want; &lt;/P&gt;
&lt;P&gt;set sasuser.x;&lt;/P&gt;
&lt;P&gt;(I have no clue beyond this... plz help)&lt;/P&gt;
&lt;/PRE&gt;&lt;P&gt;Your help is greatly appreciated in advance...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;J&lt;SPAN style="font-size: 10pt; line-height: 1.5em;"&gt;ijil Ramakrishnan&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 22 May 2014 19:34:09 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/infile-input-vs-Set/m-p/169573#M32529</guid>
      <dc:creator>JAR</dc:creator>
      <dc:date>2014-05-22T19:34:09Z</dc:date>
    </item>
    <item>
      <title>Re: infile-input vs. Set</title>
      <link>https://communities.sas.com/t5/SAS-Programming/infile-input-vs-Set/m-p/169574#M32530</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Dear Jar,&lt;/P&gt;&lt;P&gt;Please post the first few (5?) records from both the html and SAS file. &lt;/P&gt;&lt;P&gt;Thank you.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 22 May 2014 19:42:03 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/infile-input-vs-Set/m-p/169574#M32530</guid>
      <dc:creator>jwillis</dc:creator>
      <dc:date>2014-05-22T19:42:03Z</dc:date>
    </item>
    <item>
      <title>Re: infile-input vs. Set</title>
      <link>https://communities.sas.com/t5/SAS-Programming/infile-input-vs-Set/m-p/169575#M32531</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;This is my earlier communication&lt;/P&gt;&lt;PRE __jive_macro_name="quote" class="jive_text_macro jive_macro_quote"&gt;
&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;Hi,&lt;/P&gt;
&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;I need help to read one url file into a varible called record.&lt;/P&gt;
&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;&amp;nbsp; &amp;lt;/h1&amp;gt;&amp;lt;br/&amp;gt;&amp;lt;h2 class="pageTitle entryTitle"&amp;gt;test&amp;lt;span class="homograph"&amp;gt;1&amp;lt;/span&amp;gt;&amp;lt;/h2&amp;gt;&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt; /*output:*/&lt;/P&gt;
&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;Record&lt;/P&gt;
&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;&amp;lt;/h1&amp;gt;&lt;/P&gt;
&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;&amp;lt;br/&amp;gt;&lt;/P&gt;
&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;&amp;lt;h2 class="pageTitle entryTitle"&amp;gt;&lt;/P&gt;
&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;test&lt;/P&gt;
&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;&amp;lt;span class="homograph"&amp;gt;&lt;/P&gt;
&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;1&lt;/P&gt;
&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;&amp;lt;/span&amp;gt;&lt;/P&gt;
&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;&amp;lt;/h2&amp;gt;&lt;/P&gt;
&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;&amp;nbsp; Ideally, I want only "test" and "1". If someone can help me to read either the whole items or non-html-tag portion it will be highly appreciated.&lt;/P&gt;
&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;&lt;/P&gt;
&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;Regards,&lt;/P&gt;
&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;Jijil&lt;/P&gt;
&lt;/PRE&gt;&lt;P&gt;(KSharp had helped me earlier with the code above, thanks to him)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This time, the raw html data is not in an html file, rather it is in sas under 'sasuser'.&lt;/P&gt;&lt;P&gt;Jijil&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 22 May 2014 19:52:40 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/infile-input-vs-Set/m-p/169575#M32531</guid>
      <dc:creator>JAR</dc:creator>
      <dc:date>2014-05-22T19:52:40Z</dc:date>
    </item>
    <item>
      <title>Re: infile-input vs. Set</title>
      <link>https://communities.sas.com/t5/SAS-Programming/infile-input-vs-Set/m-p/169576#M32532</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thank you to refer to me. Here is :&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data have;&lt;/P&gt;&lt;P&gt;infile cards length=len;&lt;/P&gt;&lt;P&gt;input text&amp;nbsp; $varying200. len;&lt;/P&gt;&lt;P&gt;datalines4;&lt;/P&gt;&lt;P&gt; &amp;lt;/h1&amp;gt;&amp;lt;br/&amp;gt;&amp;lt;h2 class="pageTitle entryTitle"&amp;gt;test&amp;lt;span class="homograph"&amp;gt;1&amp;lt;/span&amp;gt;&amp;lt;/h2&amp;gt;&lt;/P&gt;&lt;P&gt;;;;;&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data want;&lt;/P&gt;&lt;P&gt; set have;&lt;/P&gt;&lt;P&gt; re=prxparse('/(?&amp;lt;=&amp;gt;)[^&amp;lt;]+/o');&lt;/P&gt;&lt;P&gt;start = 1;&lt;/P&gt;&lt;P&gt;stop = length(text);&lt;/P&gt;&lt;P&gt;call prxnext(re, start, stop,text, position, length);&lt;/P&gt;&lt;P&gt;do while (position &amp;gt; 0);&lt;/P&gt;&lt;P&gt;found = substr(text, position, length);&lt;/P&gt;&lt;P&gt;output;&lt;/P&gt;&lt;P&gt;call prxnext(re, start, stop, text, position, length);&lt;/P&gt;&lt;P&gt;end;&lt;/P&gt;&lt;P&gt;keep found;&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Xia Keshan&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Message was edited by: xia keshan&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 24 May 2014 11:40:09 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/infile-input-vs-Set/m-p/169576#M32532</guid>
      <dc:creator>Ksharp</dc:creator>
      <dc:date>2014-05-24T11:40:09Z</dc:date>
    </item>
    <item>
      <title>Re: infile-input vs. Set</title>
      <link>https://communities.sas.com/t5/SAS-Programming/infile-input-vs-Set/m-p/169577#M32533</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Dear KSharp,&lt;/P&gt;&lt;P&gt;Perhaps I had not illustrated my question enough earlier. The solution is much simpler, and if I had asked more claerly all of you could have helped me better:&lt;/P&gt;&lt;P&gt;Instead of accessing to a file(with HTML raw data in it) using infile input, I had to access to a sas dataset:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE __jive_macro_name="quote" class="jive_text_macro jive_macro_quote"&gt;
&lt;P&gt;data Want;&lt;/P&gt;
&lt;P&gt;Set have;&lt;/P&gt;
&lt;P&gt;&amp;nbsp; before=Record;&lt;/P&gt;
&lt;P&gt;&amp;nbsp; rx1=prxparse("s/&amp;lt;.*?&amp;gt;//");&lt;/P&gt;
&lt;P&gt;&amp;nbsp; call prxchange(rx1,99,Record);&lt;/P&gt;
&lt;P&gt;&amp;nbsp; if Record="" then delete;&lt;/P&gt;
&lt;P&gt;Run;&lt;/P&gt;
&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Jijil Ramakrishnan&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 25 May 2014 10:01:25 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/infile-input-vs-Set/m-p/169577#M32533</guid>
      <dc:creator>JAR</dc:creator>
      <dc:date>2014-05-25T10:01:25Z</dc:date>
    </item>
  </channel>
</rss>

