<?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 scan the text from Log file. in SAS Enterprise Guide</title>
    <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/How-to-scan-the-text-from-Log-file/m-p/437108#M28225</link>
    <description>&lt;P&gt;What kind of report do you want to build?&lt;/P&gt;
&lt;P&gt;It seems you are on Intelligence architecture, so if you have a quite recent release, you should be able to do stuff with Environment Manager OOTB.&lt;/P&gt;</description>
    <pubDate>Wed, 14 Feb 2018 14:51:56 GMT</pubDate>
    <dc:creator>LinusH</dc:creator>
    <dc:date>2018-02-14T14:51:56Z</dc:date>
    <item>
      <title>How to scan the text from Log file.</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/How-to-scan-the-text-from-Log-file/m-p/437008#M28213</link>
      <description>&lt;P&gt;&lt;EM&gt;I am using the following SAS code&lt;/EM&gt;&lt;/P&gt;&lt;PRE&gt;&lt;EM&gt;&lt;CODE class=" language-sas"&gt;proc printto log="/var/opt/data/data_project/sas94/bire/redwh/logs/PooledWorkspaceServer/one.log";
run;


data one;
Input A  B $;
Datalines;
1 A
2 b
;                                                                                                                                    
run;&lt;/CODE&gt;&lt;/EM&gt;&lt;/PRE&gt;&lt;P&gt;&lt;EM&gt;Here I can save my report log to somewhere. &lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;I want to know that can &lt;/EM&gt;you suggest me some sort of code where I can scan some test from that log file. I need to do that.&lt;/P&gt;</description>
      <pubDate>Wed, 14 Feb 2018 08:00:50 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/How-to-scan-the-text-from-Log-file/m-p/437008#M28213</guid>
      <dc:creator>Sourav_sas</dc:creator>
      <dc:date>2018-02-14T08:00:50Z</dc:date>
    </item>
    <item>
      <title>Re: How to scan the text from Log file.</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/How-to-scan-the-text-from-Log-file/m-p/437028#M28214</link>
      <description>&lt;P&gt;Log files are just text files.&amp;nbsp; You can read in the text file, and process it how you like with string functions:&lt;/P&gt;
&lt;PRE&gt;data want;
  infile ".../one.log";
  length instr $2000;
  input instr $;
  ...
run;&lt;/PRE&gt;</description>
      <pubDate>Wed, 14 Feb 2018 09:33:15 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/How-to-scan-the-text-from-Log-file/m-p/437028#M28214</guid>
      <dc:creator>RW9</dc:creator>
      <dc:date>2018-02-14T09:33:15Z</dc:date>
    </item>
    <item>
      <title>Re: How to scan the text from Log file.</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/How-to-scan-the-text-from-Log-file/m-p/437062#M28218</link>
      <description>&lt;P&gt;Using&amp;nbsp;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/45151"&gt;@RW9&lt;/a&gt;&amp;nbsp;'s skeleton i'd continue using regular expressions so scan the data:&lt;/P&gt;
&lt;P&gt;&lt;A href="https://support.sas.com/rnd/base/datastep/perl_regexp/regexp-tip-sheet.pdf" target="_blank"&gt;https://support.sas.com/rnd/base/datastep/perl_regexp/regexp-tip-sheet.pdf&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;//Fredrik&lt;/P&gt;</description>
      <pubDate>Wed, 14 Feb 2018 12:18:12 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/How-to-scan-the-text-from-Log-file/m-p/437062#M28218</guid>
      <dc:creator>FredrikE</dc:creator>
      <dc:date>2018-02-14T12:18:12Z</dc:date>
    </item>
    <item>
      <title>Re: How to scan the text from Log file.</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/How-to-scan-the-text-from-Log-file/m-p/437108#M28225</link>
      <description>&lt;P&gt;What kind of report do you want to build?&lt;/P&gt;
&lt;P&gt;It seems you are on Intelligence architecture, so if you have a quite recent release, you should be able to do stuff with Environment Manager OOTB.&lt;/P&gt;</description>
      <pubDate>Wed, 14 Feb 2018 14:51:56 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/How-to-scan-the-text-from-Log-file/m-p/437108#M28225</guid>
      <dc:creator>LinusH</dc:creator>
      <dc:date>2018-02-14T14:51:56Z</dc:date>
    </item>
    <item>
      <title>Re: How to scan the text from Log file.</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/How-to-scan-the-text-from-Log-file/m-p/437421#M28239</link>
      <description>&lt;P&gt;Actually I want to scan the log from that path, and then if error will be there, respect to some specific error like "Statement is not valid or it is used out of proper order"(suppose) then it will shoot one mail to me or user.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Note: I want to specify the error test in the condition. Not for all error.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have used another sort of code. Here can we do anything?&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;Options obs=max nosymbolgen nomlogic nomprint;
%INCLUDE "/home/name/Test.sas";
%Let Joblog = /home/name/;
%Let Jobdate = &amp;amp;sysdate9.;
%Let Jobname = RUN_LoadTB_Refresh;
%LOGCHECK(&amp;amp;joblog.&amp;amp;JOBNAME._&amp;amp;jobdate..log,name);
run;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Please help me.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Sourav&lt;/P&gt;</description>
      <pubDate>Thu, 15 Feb 2018 05:00:25 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/How-to-scan-the-text-from-Log-file/m-p/437421#M28239</guid>
      <dc:creator>Sourav_sas</dc:creator>
      <dc:date>2018-02-15T05:00:25Z</dc:date>
    </item>
    <item>
      <title>Re: How to scan the text from Log file.</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/How-to-scan-the-text-from-Log-file/m-p/441134#M28460</link>
      <description>&lt;P&gt;I am working in SAS EG, and I am running some prompt related to this report through DI studio. But if I want to run the code only from EG, above sort of code I am using, but not able to specify the error text. My aim is to specify the error text in the code, and to get mail respect that error only from the log...&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;If there any possibilities that we can mention the error text in the condition or in the loop, instead of any error code no, please let me know, I am chasing for this issue for long time, I need one permanent solution on this...&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Sourav&lt;/P&gt;</description>
      <pubDate>Thu, 01 Mar 2018 08:19:09 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/How-to-scan-the-text-from-Log-file/m-p/441134#M28460</guid>
      <dc:creator>Sourav_sas</dc:creator>
      <dc:date>2018-03-01T08:19:09Z</dc:date>
    </item>
    <item>
      <title>Re: How to scan the text from Log file.</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/How-to-scan-the-text-from-Log-file/m-p/441139#M28463</link>
      <description>&lt;P&gt;Look in to the following code&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;Filename _log_ "/home/re00627/test.log";

Data Log1;
Infile _log_ truncover;
input a_line $200.;
/*If Substr(a_line,1,57) = 'Statement is not valid or it is used out of proper order.'*/
/**/
if index(a_line, 'Statement is not valid or it is used out of proper order.') &amp;gt; 0 

then Do;
/*index(a_line, 'WARNING') &amp;gt; 0*/
filename myfile email                                                                                                                   
to= "mail_id"                                                                                                               
subject= "Error in Report"                                                                                                              
type= "text/plain"
importance="HIGH";
data _null_;                                                                                                                          
   file myfile;                                                                                                                         
   put 'Dear User';                                                                        
   put;                                                                                                                                 
   put 'Due to your selection you are getting this mail.';                                                                                                                                                                                                                            
  put;                                                                                                                                 
   put 'Please go with some short selction.';                                                                                                                                                                                                                       
  run;
  End;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;This code is not working, Here can you help me with some other option. If I am using, neither the index function is working nor SUSTR, if you have some easy solution please let e know.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 01 Mar 2018 08:53:14 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/How-to-scan-the-text-from-Log-file/m-p/441139#M28463</guid>
      <dc:creator>Sourav_sas</dc:creator>
      <dc:date>2018-03-01T08:53:14Z</dc:date>
    </item>
  </channel>
</rss>

