<?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 save log and view log summary at the same time? in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/How-to-save-log-and-view-log-summary-at-the-same-time/m-p/761310#M240886</link>
    <description>&lt;P&gt;The way to do this is to use the ALTLOG option. This sadly is only a startup option. it would be very useful to have the choice on the go.&lt;/P&gt;
&lt;P&gt;An imperfect alternative is to re-read the log file:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;option spool ;
proc printto log = "&amp;amp;wdir\tt.log" new;

proc sql; create table T as select 1 as X, 1 as X from SASHELP.CLASS; quit;
                                                         
proc printto log = log;

data _null_;
  infile  "&amp;amp;wdir\tt.log";
  input;
  putlog _infile_; 
run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;I see that you use EG. EG will highlight &lt;U&gt;some&lt;/U&gt; messages, depending on its mood at the time and its version:&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="ChrisNZ_0-1628810218115.png" style="width: 400px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/62535iF466D64310279519/image-size/medium?v=v2&amp;amp;px=400" role="button" title="ChrisNZ_0-1628810218115.png" alt="ChrisNZ_0-1628810218115.png" /&gt;&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;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Thu, 12 Aug 2021 23:18:07 GMT</pubDate>
    <dc:creator>ChrisNZ</dc:creator>
    <dc:date>2021-08-12T23:18:07Z</dc:date>
    <item>
      <title>How to save log and view log summary at the same time?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-save-log-and-view-log-summary-at-the-same-time/m-p/761285#M240869</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;/P&gt;&lt;P&gt;I used proc printto to save logs, yet this way the log summary will not show if any error or warning. I am wondering if there is anyway that I can save all the log information while also could view the log summary?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Capture.JPG" style="width: 833px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/62532i016E99F0153F0187/image-size/large?v=v2&amp;amp;px=999" role="button" title="Capture.JPG" alt="Capture.JPG" /&gt;&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 12 Aug 2021 20:50:24 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-save-log-and-view-log-summary-at-the-same-time/m-p/761285#M240869</guid>
      <dc:creator>tinaz5012</dc:creator>
      <dc:date>2021-08-12T20:50:24Z</dc:date>
    </item>
    <item>
      <title>Re: How to save log and view log summary at the same time?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-save-log-and-view-log-summary-at-the-same-time/m-p/761310#M240886</link>
      <description>&lt;P&gt;The way to do this is to use the ALTLOG option. This sadly is only a startup option. it would be very useful to have the choice on the go.&lt;/P&gt;
&lt;P&gt;An imperfect alternative is to re-read the log file:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;option spool ;
proc printto log = "&amp;amp;wdir\tt.log" new;

proc sql; create table T as select 1 as X, 1 as X from SASHELP.CLASS; quit;
                                                         
proc printto log = log;

data _null_;
  infile  "&amp;amp;wdir\tt.log";
  input;
  putlog _infile_; 
run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;I see that you use EG. EG will highlight &lt;U&gt;some&lt;/U&gt; messages, depending on its mood at the time and its version:&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="ChrisNZ_0-1628810218115.png" style="width: 400px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/62535iF466D64310279519/image-size/medium?v=v2&amp;amp;px=400" role="button" title="ChrisNZ_0-1628810218115.png" alt="ChrisNZ_0-1628810218115.png" /&gt;&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;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 12 Aug 2021 23:18:07 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-save-log-and-view-log-summary-at-the-same-time/m-p/761310#M240886</guid>
      <dc:creator>ChrisNZ</dc:creator>
      <dc:date>2021-08-12T23:18:07Z</dc:date>
    </item>
    <item>
      <title>Re: How to save log and view log summary at the same time?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-save-log-and-view-log-summary-at-the-same-time/m-p/761316#M240888</link>
      <description>&lt;P&gt;I dislike PRINTTO for that very reason.&amp;nbsp; In batch jobs, I use -ALTLOG which creates a copy of the log, but I've not tried setting that up in Enterprise Guide.&amp;nbsp; I'm not sure that ALTLOG would be supported in EG since it usually has to be specified at start up.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I think the best alternative in EG is to create a step in the Project that automatically exports your log.&amp;nbsp; It's not perfect, but it's generally workable.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Above the program editor window, there is a "Share" icon.&amp;nbsp; You would click on that and then "Log" and then "Export as a step in project."&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="jimbarbour_0-1628810348606.png" style="width: 999px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/62536iEBDEF144CE7E51B4/image-size/large?v=v2&amp;amp;px=999" role="button" title="jimbarbour_0-1628810348606.png" alt="jimbarbour_0-1628810348606.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;A wizard should open up.&amp;nbsp; Step through the wizard, making sure to&amp;nbsp;&lt;STRONG&gt;un&lt;/STRONG&gt;check "Overwrite existing output".&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="jimbarbour_1-1628811008969.png" style="width: 999px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/62537i89E0BF1E79F4CB30/image-size/large?v=v2&amp;amp;px=999" role="button" title="jimbarbour_1-1628811008969.png" alt="jimbarbour_1-1628811008969.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;SAS will automatically copy the log every time you run that part of the process and will embed a date time stamp in the filename. Unfortunately, macro variables are not resolved in this context.&amp;nbsp; &lt;span class="lia-unicode-emoji" title=":disappointed_face:"&gt;😞&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="jimbarbour_3-1628811114419.png" style="width: 999px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/62539i61C01D95AD0BA655/image-size/large?v=v2&amp;amp;px=999" role="button" title="jimbarbour_3-1628811114419.png" alt="jimbarbour_3-1628811114419.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Make sure you select and run both the program and the export step or the log will not be automatically saved.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Jim&lt;/P&gt;</description>
      <pubDate>Thu, 12 Aug 2021 23:38:17 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-save-log-and-view-log-summary-at-the-same-time/m-p/761316#M240888</guid>
      <dc:creator>jimbarbour</dc:creator>
      <dc:date>2021-08-12T23:38:17Z</dc:date>
    </item>
    <item>
      <title>Re: How to save log and view log summary at the same time?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-save-log-and-view-log-summary-at-the-same-time/m-p/761317#M240889</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/16961"&gt;@ChrisNZ&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;
&lt;P&gt;I see that you use EG. EG will highlight &lt;U&gt;some&lt;/U&gt; messages, depending on its mood at the time and its version:&lt;/P&gt;
&lt;/BLOCKQUOTE&gt;
&lt;P&gt;EG 8.2 (and presumably subsequent versions) is a&amp;nbsp;&lt;EM&gt;lot&lt;/EM&gt; better than its predecessors.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Jim&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 12 Aug 2021 23:40:31 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-save-log-and-view-log-summary-at-the-same-time/m-p/761317#M240889</guid>
      <dc:creator>jimbarbour</dc:creator>
      <dc:date>2021-08-12T23:40:31Z</dc:date>
    </item>
  </channel>
</rss>

