<?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 SAS Contextual Analysis : Getting Data in SAS Data Science</title>
    <link>https://communities.sas.com/t5/SAS-Data-Science/SAS-Contextual-Analysis-Getting-Data/m-p/559854#M10023</link>
    <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;Presently I am working on a project which requires to read data from Website into SAS Contextual Analysis.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The objective is to find out whether one of client customers name is appearing on a given website.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;One of the websites from which we need to read the data is "&lt;A href="https://www.moneycontrol.com/news/" target="_blank"&gt;https://www.moneycontrol.com/news/"&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I need some advice on how to read data from websites using SAS Visual Analytics or any other SAS tools and&amp;nbsp;&lt;/P&gt;&lt;P&gt;How to Create a dataset from extracted data and pulling in data set to SAS Contextual Analysis.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Urgent advice is needed.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;P&gt;Rakesh Kumar&lt;/P&gt;&lt;P&gt;Contact - +91-9008964466&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Sat, 18 May 2019 07:13:20 GMT</pubDate>
    <dc:creator>rk3664</dc:creator>
    <dc:date>2019-05-18T07:13:20Z</dc:date>
    <item>
      <title>SAS Contextual Analysis : Getting Data</title>
      <link>https://communities.sas.com/t5/SAS-Data-Science/SAS-Contextual-Analysis-Getting-Data/m-p/559854#M10023</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;Presently I am working on a project which requires to read data from Website into SAS Contextual Analysis.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The objective is to find out whether one of client customers name is appearing on a given website.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;One of the websites from which we need to read the data is "&lt;A href="https://www.moneycontrol.com/news/" target="_blank"&gt;https://www.moneycontrol.com/news/"&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I need some advice on how to read data from websites using SAS Visual Analytics or any other SAS tools and&amp;nbsp;&lt;/P&gt;&lt;P&gt;How to Create a dataset from extracted data and pulling in data set to SAS Contextual Analysis.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Urgent advice is needed.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;P&gt;Rakesh Kumar&lt;/P&gt;&lt;P&gt;Contact - +91-9008964466&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sat, 18 May 2019 07:13:20 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Data-Science/SAS-Contextual-Analysis-Getting-Data/m-p/559854#M10023</guid>
      <dc:creator>rk3664</dc:creator>
      <dc:date>2019-05-18T07:13:20Z</dc:date>
    </item>
    <item>
      <title>Re: SAS Contextual Analysis : Getting Data</title>
      <link>https://communities.sas.com/t5/SAS-Data-Science/SAS-Contextual-Analysis-Getting-Data/m-p/580766#M10024</link>
      <description>&lt;P&gt;Hi Rakesh,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I think you can use PROC HTTP to extract the tags from a websites and then use any pattern matching technique to find the common pattern and set a status as Success or some flag.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;For example:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;filename src temp;
proc http
 method="GET"
 url= "https://www.moneycontrol.com/news/"
 out=src;
run;
data rep;
infile src length=len lrecl=32767;
input line $varying32767. len;
 line = strip(line);
 if len&amp;gt;0;
run;
&lt;BR /&gt;data _Trials_(drop=recordline record nextpage);&lt;BR /&gt;length Status $25 ;&lt;BR /&gt;retain Status;&lt;BR /&gt;retain recordLine 0; *=1 means this line may contain needed information;&lt;BR /&gt;set rep;&lt;BR /&gt;if prxmatch('/&amp;gt;Study&amp;lt;/i',line) then recordLine=1;&lt;BR /&gt;if (recordLine=1) then do; *now get the related information;&lt;BR /&gt;if prxmatch('/&amp;gt;Study&amp;lt;/i',line) then status='Success';&lt;BR /&gt;run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;So in the above fashion you might try to search something inside the parser as per your requirement and if you want to store the number of occurrences of the same word then you can use the call prxnext.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thanks and Gud luck.&lt;/P&gt;</description>
      <pubDate>Tue, 13 Aug 2019 11:56:30 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Data-Science/SAS-Contextual-Analysis-Getting-Data/m-p/580766#M10024</guid>
      <dc:creator>rajdeep</dc:creator>
      <dc:date>2019-08-13T11:56:30Z</dc:date>
    </item>
  </channel>
</rss>

