<?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 Is there a method to code automatically save results as lst file when code is finish running? in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Is-there-a-method-to-code-automatically-save-results-as-lst-file/m-p/760905#M240686</link>
    <description>&lt;P&gt;I start all my code by clearing the results fine using "dm 'odsresults; clear';" as specified on this &lt;A href="https://support.sas.com/kb/4/159.html" target="_self"&gt;page&lt;/A&gt;. I was wondering is there a way to save the results as a lst file (instead of clicking on output, file=&amp;gt;Save AS) via syntax?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I am able to do it for automatically save the log file automatically by using the "DM LOG" command and specifying a file location/name at the end of my code. I can't seem figure out a way to do it for results/LST file, so wondering if anyone can show me how.&lt;/P&gt;</description>
    <pubDate>Wed, 11 Aug 2021 13:08:27 GMT</pubDate>
    <dc:creator>Tpham</dc:creator>
    <dc:date>2021-08-11T13:08:27Z</dc:date>
    <item>
      <title>Is there a method to code automatically save results as lst file when code is finish running?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Is-there-a-method-to-code-automatically-save-results-as-lst-file/m-p/760905#M240686</link>
      <description>&lt;P&gt;I start all my code by clearing the results fine using "dm 'odsresults; clear';" as specified on this &lt;A href="https://support.sas.com/kb/4/159.html" target="_self"&gt;page&lt;/A&gt;. I was wondering is there a way to save the results as a lst file (instead of clicking on output, file=&amp;gt;Save AS) via syntax?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I am able to do it for automatically save the log file automatically by using the "DM LOG" command and specifying a file location/name at the end of my code. I can't seem figure out a way to do it for results/LST file, so wondering if anyone can show me how.&lt;/P&gt;</description>
      <pubDate>Wed, 11 Aug 2021 13:08:27 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Is-there-a-method-to-code-automatically-save-results-as-lst-file/m-p/760905#M240686</guid>
      <dc:creator>Tpham</dc:creator>
      <dc:date>2021-08-11T13:08:27Z</dc:date>
    </item>
    <item>
      <title>Re: Is there a method to code automatically save results as lst file when code is finish running?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Is-there-a-method-to-code-automatically-save-results-as-lst-file/m-p/760906#M240687</link>
      <description>&lt;P&gt;Is something like this what you are looking for? Place this at the beginning of your program, or at any point within the program where you want the .LST file to begin.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;ods listing file="\\server\folder\example1.lst";
&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;and as the last line of code, or anywhere where you want the creation of the .LST file to stop&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;ods listing close;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;Or you can use &lt;A href="https://documentation.sas.com/doc/en/pgmsascdc/9.4_3.4/proc/p08blwp6gwk25mn1hypjjrncx3bn.htm" target="_self"&gt;PROC PRINTTO&lt;/A&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 11 Aug 2021 14:56:38 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Is-there-a-method-to-code-automatically-save-results-as-lst-file/m-p/760906#M240687</guid>
      <dc:creator>PaigeMiller</dc:creator>
      <dc:date>2021-08-11T14:56:38Z</dc:date>
    </item>
    <item>
      <title>Re: Is there a method to code automatically save results as lst file when code is finish running?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Is-there-a-method-to-code-automatically-save-results-as-lst-file/m-p/760909#M240689</link>
      <description>&lt;P&gt;Are you asking for the DM command to save the LOG to a file?&amp;nbsp; You could use the FILE command.&amp;nbsp; But it general for the LOG and OUTPUT windows it is better to use the PRINT command since then the formfeeds are inserted between the pages.&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;dm 'log; print file="myprogram.log"; ';&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 11 Aug 2021 13:27:31 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Is-there-a-method-to-code-automatically-save-results-as-lst-file/m-p/760909#M240689</guid>
      <dc:creator>Tom</dc:creator>
      <dc:date>2021-08-11T13:27:31Z</dc:date>
    </item>
  </channel>
</rss>

