<?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: SAS EG needs a function to display the log AND automatically save it in SAS Enterprise Guide</title>
    <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/SAS-EG-needs-a-function-to-display-the-log-AND-automatically/m-p/984882#M46447</link>
    <description>&lt;P&gt;&amp;gt;&amp;gt;&amp;gt;&amp;nbsp; &amp;nbsp;&lt;SPAN&gt;I want to see the log, updated in real time, as the code&amp;nbsp; runs, in case there are errors or warnings. That way I can fix them instead of waiting minutes or hours to find out there was an error.&amp;nbsp; &amp;nbsp; &amp;lt;&amp;lt;&amp;lt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;EG updates the log after each step boundary (data, proc, etc.), so, if your program has several steps then the log will update after each step completes.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;Also, if your EG project has several SAS programs then you can specify the action to take when an error occurs potentially saving you a lot of time.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;To do this, right-click on a program node to choose &lt;STRONG&gt;Properties&lt;/STRONG&gt;, then click &lt;STRONG&gt;Code Submission&lt;/STRONG&gt;, then click &lt;STRONG&gt;Customize Code Submission Options&lt;/STRONG&gt;, then for &lt;STRONG&gt;Action to take on Error in the execution of this program&lt;/STRONG&gt; select, for example, &lt;STRONG&gt;Stop all items.&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;Regards,&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;Bill&lt;/SPAN&gt;&lt;/P&gt;
&lt;DIV id="tinyMceEditorBillSawyer_0" class="mceNonEditable lia-copypaste-placeholder"&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;DIV id="tinyMceEditorBillSawyer_1" class="mceNonEditable lia-copypaste-placeholder"&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Tue, 17 Mar 2026 16:19:21 GMT</pubDate>
    <dc:creator>BillSawyer</dc:creator>
    <dc:date>2026-03-17T16:19:21Z</dc:date>
    <item>
      <title>SAS EG needs a function to display the log AND automatically save it</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/SAS-EG-needs-a-function-to-display-the-log-AND-automatically/m-p/984601#M46440</link>
      <description>&lt;P&gt;I'm sure this has been a topic of discussion for other users, but the search function on this site sucks.&amp;nbsp;A search for SAS EG log returns everything with SAS, everything with a capital E, everything with a capital G, and everything with log). Adding quotes or other Boolean operators doesn't help.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Anyway, I've used base SAS for years, but I'm a relatively new user of SAS EG. I want to see the log, updated in real time, as the code&amp;nbsp; runs, in case there are errors or warnings. That way I can fix them instead of waiting minutes or hours to find out there was an error. This is the default behavior for both base and EG.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;However, there are also times when I want the log to save automatically after the code completes. I want to use a macro variable so that the program name and version are automatically added to the log file name. This is trivial in base SAS. It simply requires adding a line of code at the end of the program:&amp;nbsp;/*&lt;EM&gt;Save log*&lt;/EM&gt;/&lt;BR /&gt;dm "log; file ""path/logs/&amp;amp;progname.V&amp;amp;version..log"" replace;";&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;This is no longer supported in SAS EG, and no replacement for this behavior has been added. But what REALLY pisses me off is that no error or warning is displayed in the log to indicate that the dm statement was not executed! I ran several programs, thinking that the logs were being saved, only to find out they're gone forever. The data is occasionally updated, so I can't recreate them.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Why was such a basic function from base SAS dropped in the "more advanced" SAS EG? That's like buying a luxury car and finding out it doesn't have windshield wipers&amp;nbsp;&lt;span class="lia-unicode-emoji" title=":face_with_rolling_eyes:"&gt;🙄&lt;/span&gt;&amp;nbsp;And having to manually name and save the log file is like the dealer telling u that u can just stick your hand out of the window and use a squeegee to clean the windshield as u drive.&lt;/P&gt;</description>
      <pubDate>Wed, 11 Mar 2026 14:34:39 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/SAS-EG-needs-a-function-to-display-the-log-AND-automatically/m-p/984601#M46440</guid>
      <dc:creator>Wolverine</dc:creator>
      <dc:date>2026-03-11T14:34:39Z</dc:date>
    </item>
    <item>
      <title>Re: SAS EG needs a function to display the log AND automatically save it</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/SAS-EG-needs-a-function-to-display-the-log-AND-automatically/m-p/984604#M46441</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/43822"&gt;@Wolverine&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;DM commands are for&amp;nbsp;&lt;STRONG&gt;Display Manager&lt;/STRONG&gt;, the windowing environment of SAS that most people experience as "PC SAS". DM commands do not function in an SAS runtime environment that isn't Display Manager. For example, if you were to run your program in batch SAS:&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;
&lt;PRE&gt;"C:\Program Files\SASHome\SASFoundation\9.4\sas.exe" -sysin c:\temp\logtest.sas&lt;/PRE&gt;
&lt;P&gt;Your log file would also not be saved/refreshed.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;To focus on the spirit of the question: is there a way to automatically save a log in EG? Yes. For any task/program, you can export the SAS log as a step:&lt;/P&gt;
&lt;DIV id="tinyMceEditorChrisHemedinger_0" class="mceNonEditable lia-copypaste-placeholder"&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="69b5c8de-d11c-465d-849c-0d1e5a0bb78a.png" style="width: 400px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/113556iAEC0D5872DE40F39/image-size/medium?v=v2&amp;amp;px=400" role="button" title="69b5c8de-d11c-465d-849c-0d1e5a0bb78a.png" alt="69b5c8de-d11c-465d-849c-0d1e5a0bb78a.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;This allows you to specify a place and option to overwrite an existing file. &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="log-step-export-flow.png" style="width: 574px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/113557iF8281313E27A1367/image-size/large?v=v2&amp;amp;px=999" role="button" title="log-step-export-flow.png" alt="log-step-export-flow.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;Remember that &lt;A href="https://go.documentation.sas.com/doc/en/egcdc/8.6/egdoccdc/egug/p0sf4tl5ll1gfbn1voiyqguqqie1.htm" target="_self"&gt;EG also supports the Project Log&lt;/A&gt;, which allows you to aggregate and export log content from an entire flow or project.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 11 Mar 2026 14:58:41 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/SAS-EG-needs-a-function-to-display-the-log-AND-automatically/m-p/984604#M46441</guid>
      <dc:creator>ChrisHemedinger</dc:creator>
      <dc:date>2026-03-11T14:58:41Z</dc:date>
    </item>
    <item>
      <title>Re: SAS EG needs a function to display the log AND automatically save it</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/SAS-EG-needs-a-function-to-display-the-log-AND-automatically/m-p/984615#M46442</link>
      <description>&lt;P&gt;If you have access to SAS from a Linux terminal (I see you're using forward slashes), write and submit your programs from there and &lt;STRONG&gt;&lt;EM&gt;never look at a GUI again&lt;/EM&gt;&lt;/STRONG&gt;.&amp;nbsp; Logs will be saved automatically as a bonus.&amp;nbsp;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 11 Mar 2026 19:52:19 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/SAS-EG-needs-a-function-to-display-the-log-AND-automatically/m-p/984615#M46442</guid>
      <dc:creator>quickbluefish</dc:creator>
      <dc:date>2026-03-11T19:52:19Z</dc:date>
    </item>
    <item>
      <title>Re: SAS EG needs a function to display the log AND automatically save it</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/SAS-EG-needs-a-function-to-display-the-log-AND-automatically/m-p/984686#M46443</link>
      <description>&lt;BLOCKQUOTE&gt;
&lt;P&gt;To focus on the spirit of the question: is there a way to automatically save a log in EG? Yes. For any task/program, you can export the SAS log as a step&lt;/P&gt;
&lt;/BLOCKQUOTE&gt;
&lt;P&gt;That's still not a great solution, because it takes longer to set up the Project than it does to manually save the log. And is there a way to use macro variable from the program to automatically generate the filename of the log file?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;In the SAS EG log window, the user can go to Share/Log/Export, and then choose the destination path and change the filename of the log file. Would it really be that difficult to add a command to SAS EG that could perform these steps (that the GUI is already capable of doing!) based on a line or two of code, just like base SAS can do? I realize that SAS EG doesn't use Display Manager, but it seems like it would be almost trivial to add a substitute command that is at least capable of saving logs.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 12 Mar 2026 18:11:07 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/SAS-EG-needs-a-function-to-display-the-log-AND-automatically/m-p/984686#M46443</guid>
      <dc:creator>Wolverine</dc:creator>
      <dc:date>2026-03-12T18:11:07Z</dc:date>
    </item>
    <item>
      <title>Re: SAS EG needs a function to display the log AND automatically save it</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/SAS-EG-needs-a-function-to-display-the-log-AND-automatically/m-p/984689#M46444</link>
      <description>&lt;P&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/43822"&gt;@Wolverine&lt;/a&gt;&amp;nbsp;- I get the impression you are using EG for both running Production jobs where you want to keep SAS logs and also for program development and analytics. If this is the case then an alternative approach could be to move the running of your Production jobs to SAS Management Console. Not only can they be automated with Schedule Manager, SAS logs are produced and saved automatically. Not only that you can trigger automatic emails if the jobs fail so you only need to look at SAS logs if you get an email. We use this approach and it works a treat.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 12 Mar 2026 19:07:28 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/SAS-EG-needs-a-function-to-display-the-log-AND-automatically/m-p/984689#M46444</guid>
      <dc:creator>SASKiwi</dc:creator>
      <dc:date>2026-03-12T19:07:28Z</dc:date>
    </item>
    <item>
      <title>Re: SAS EG needs a function to display the log AND automatically save it</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/SAS-EG-needs-a-function-to-display-the-log-AND-automatically/m-p/984882#M46447</link>
      <description>&lt;P&gt;&amp;gt;&amp;gt;&amp;gt;&amp;nbsp; &amp;nbsp;&lt;SPAN&gt;I want to see the log, updated in real time, as the code&amp;nbsp; runs, in case there are errors or warnings. That way I can fix them instead of waiting minutes or hours to find out there was an error.&amp;nbsp; &amp;nbsp; &amp;lt;&amp;lt;&amp;lt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;EG updates the log after each step boundary (data, proc, etc.), so, if your program has several steps then the log will update after each step completes.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;Also, if your EG project has several SAS programs then you can specify the action to take when an error occurs potentially saving you a lot of time.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;To do this, right-click on a program node to choose &lt;STRONG&gt;Properties&lt;/STRONG&gt;, then click &lt;STRONG&gt;Code Submission&lt;/STRONG&gt;, then click &lt;STRONG&gt;Customize Code Submission Options&lt;/STRONG&gt;, then for &lt;STRONG&gt;Action to take on Error in the execution of this program&lt;/STRONG&gt; select, for example, &lt;STRONG&gt;Stop all items.&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;Regards,&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;Bill&lt;/SPAN&gt;&lt;/P&gt;
&lt;DIV id="tinyMceEditorBillSawyer_0" class="mceNonEditable lia-copypaste-placeholder"&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;DIV id="tinyMceEditorBillSawyer_1" class="mceNonEditable lia-copypaste-placeholder"&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 17 Mar 2026 16:19:21 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/SAS-EG-needs-a-function-to-display-the-log-AND-automatically/m-p/984882#M46447</guid>
      <dc:creator>BillSawyer</dc:creator>
      <dc:date>2026-03-17T16:19:21Z</dc:date>
    </item>
  </channel>
</rss>

