<?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 Log Scanner Program in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Log-Scanner-Program/m-p/723902#M224722</link>
    <description>&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;I am trying to run the "LOG Scanner Program" which is provided in the extended learning section of Programming 2. Here is the code:&lt;/P&gt;&lt;PRE&gt;/*Change the following macro variables*/

%let logpath =/*Log file directory*/;
%let filename = /*Log file full name*/;

data logdata;
   retain flag 0;
   drop flag;
   infile "&amp;amp;logpath.\&amp;amp;filename" truncover end=last;
   logfile = "&amp;amp;filename";
   line+1;
   input text $1024.;
   if (    find(text, 'ERROR:')  
        or find(text, 'WARNING:') 
        or find(text, 'REPEATS OF BY VALUES','i') 
        or find(text, 'UNINITIALIZED','i') 
        or find(text, 'FORMAT WAS TOO SMALL','i') 
        or find(text, 'HAVE BEEN CONVERTED TO','i') 
        or find(text, 'INVALID ARGUMENT','i') 
        or find(text, 'OPERATIONS COULD NOT BE PERFORMED','i') 
        or find(text, 'BECAUSE OF ERRORS','i')
        or find(text, 'SYNTAX CHECKING MODE','i')
       )
       and not index(text, 'NO MATCHING MEMBERS IN DIRECTORY') then
      do;
         flag = 1;
         output;
      end;
   else if last and flag = 0 then
      do;
         text = '(none)';
         output;
      end;
   label text='Log entry requiring explanation';
run;

title "Errors, warnings and notes in the SAS log requiring justification:";
proc sql;
select * from logdata;
quit;&lt;/PRE&gt;&lt;P&gt;My questions is where&amp;nbsp;can I find "Log file directory" and "log file full name" to be able to run this program.&lt;/P&gt;&lt;P&gt;Thank you,&lt;/P&gt;</description>
    <pubDate>Fri, 05 Mar 2021 16:34:32 GMT</pubDate>
    <dc:creator>Avideh</dc:creator>
    <dc:date>2021-03-05T16:34:32Z</dc:date>
    <item>
      <title>Log Scanner Program</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Log-Scanner-Program/m-p/723902#M224722</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;I am trying to run the "LOG Scanner Program" which is provided in the extended learning section of Programming 2. Here is the code:&lt;/P&gt;&lt;PRE&gt;/*Change the following macro variables*/

%let logpath =/*Log file directory*/;
%let filename = /*Log file full name*/;

data logdata;
   retain flag 0;
   drop flag;
   infile "&amp;amp;logpath.\&amp;amp;filename" truncover end=last;
   logfile = "&amp;amp;filename";
   line+1;
   input text $1024.;
   if (    find(text, 'ERROR:')  
        or find(text, 'WARNING:') 
        or find(text, 'REPEATS OF BY VALUES','i') 
        or find(text, 'UNINITIALIZED','i') 
        or find(text, 'FORMAT WAS TOO SMALL','i') 
        or find(text, 'HAVE BEEN CONVERTED TO','i') 
        or find(text, 'INVALID ARGUMENT','i') 
        or find(text, 'OPERATIONS COULD NOT BE PERFORMED','i') 
        or find(text, 'BECAUSE OF ERRORS','i')
        or find(text, 'SYNTAX CHECKING MODE','i')
       )
       and not index(text, 'NO MATCHING MEMBERS IN DIRECTORY') then
      do;
         flag = 1;
         output;
      end;
   else if last and flag = 0 then
      do;
         text = '(none)';
         output;
      end;
   label text='Log entry requiring explanation';
run;

title "Errors, warnings and notes in the SAS log requiring justification:";
proc sql;
select * from logdata;
quit;&lt;/PRE&gt;&lt;P&gt;My questions is where&amp;nbsp;can I find "Log file directory" and "log file full name" to be able to run this program.&lt;/P&gt;&lt;P&gt;Thank you,&lt;/P&gt;</description>
      <pubDate>Fri, 05 Mar 2021 16:34:32 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Log-Scanner-Program/m-p/723902#M224722</guid>
      <dc:creator>Avideh</dc:creator>
      <dc:date>2021-03-05T16:34:32Z</dc:date>
    </item>
    <item>
      <title>Re: Log Scanner Program</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Log-Scanner-Program/m-p/723956#M224735</link>
      <description>&lt;P&gt;Hello&amp;nbsp;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/313565"&gt;@Avideh&lt;/a&gt;&amp;nbsp;and welcome to the SAS Support Communities!&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;This program is designed to read a SAS log that has been saved as a text file. You can save the contents of the Log window manually ("Save as...") or use &lt;A href="https://documentation.sas.com/?cdcId=pgmsascdc&amp;amp;cdcVersion=9.4_3.5&amp;amp;docsetId=proc&amp;amp;docsetTarget=p1hwvc03z4tqlkn1owzhzo8e7ulu.htm&amp;amp;locale=en" target="_blank" rel="noopener"&gt;PROC PRINTTO&lt;/A&gt;&amp;nbsp;or the &lt;A href="https://documentation.sas.com/?cdcId=pgmsascdc&amp;amp;cdcVersion=9.4_3.5&amp;amp;docsetId=hostwin&amp;amp;docsetTarget=n02cl0iq0k1fmxn11p83yirplodk.htm&amp;amp;locale=en" target="_blank" rel="noopener"&gt;ALTLOG system option&lt;/A&gt; to route (a copy of) the log automatically to an external file. You can also run a program in &lt;A href="https://go.documentation.sas.com/?cdcId=pgmsascdc&amp;amp;cdcVersion=9.4_3.5&amp;amp;docsetId=hostwin&amp;amp;docsetTarget=p16esisc4nrd5sn1ps5l6u8f79k6.htm&amp;amp;locale=en#p01fzykn6n0s73n164xasi1t3ii9" target="_blank" rel="noopener"&gt;batch mode&lt;/A&gt;&amp;nbsp;and specify the path for the log in the &lt;A href="https://documentation.sas.com/?cdcId=pgmsascdc&amp;amp;cdcVersion=9.4_3.5&amp;amp;docsetId=hostwin&amp;amp;docsetTarget=n0u77ujp4vk4wvn1p5e8g6jmjkx7.htm&amp;amp;locale=en" target="_blank" rel="noopener"&gt;LOG system option&lt;/A&gt;.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If the log is stored in, say,&amp;nbsp;&lt;FONT face="courier new,courier"&gt;C:\Temp\my_program.log&lt;/FONT&gt;, you specify&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;%let logpath = C:\Temp;
%let filename = my_program.log;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;and submit the&amp;nbsp;&lt;SPAN&gt;"LOG Scanner Program" including these macro variable definitions.&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 05 Mar 2021 18:35:25 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Log-Scanner-Program/m-p/723956#M224735</guid>
      <dc:creator>FreelanceReinh</dc:creator>
      <dc:date>2021-03-05T18:35:25Z</dc:date>
    </item>
    <item>
      <title>Re: Log Scanner Program</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Log-Scanner-Program/m-p/724036#M224764</link>
      <description>Thank you!</description>
      <pubDate>Fri, 05 Mar 2021 21:02:33 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Log-Scanner-Program/m-p/724036#M224764</guid>
      <dc:creator>Avideh</dc:creator>
      <dc:date>2021-03-05T21:02:33Z</dc:date>
    </item>
  </channel>
</rss>

