<?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 Writing to a log file in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Writing-to-a-log-file/m-p/426053#M104951</link>
    <description>&lt;P&gt;I have been using the following code to write to a log file while running a program to avoid the log containing the output.&lt;/P&gt;&lt;DIV class="sasSource"&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV class="sasSource"&gt;&lt;SPAN&gt;proc printto log='/folders/myfolders/BootRIT/filenOLD.LST/';&lt;/SPAN&gt;&lt;/DIV&gt;&lt;P&gt;However I get this error while running SAS University edition.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;DIV class="sasSource"&gt;1 OPTIONS NONOTES NOSTIMER NOSOURCE NOSYNTAXCHECK;&lt;/DIV&gt;&lt;DIV class="sasSource"&gt;61&lt;/DIV&gt;&lt;DIV class="sasSource"&gt;62 /*PROGRAM TAKES A CONTROL FILE AND DUPLICATES IT N TIMES*/&lt;/DIV&gt;&lt;DIV class="sasSource"&gt;63 /*THE $DATA LINE IS ALSO CHANGED TO MATCH THE FILE NAME*/&lt;/DIV&gt;&lt;DIV class="sasSource"&gt;64 proc printto log='/folders/myfolders/BootRIT/filenOLD.LST/';&lt;/DIV&gt;&lt;DIV class="sasSource"&gt;65 RUN;&lt;/DIV&gt;&lt;DIV class="sasNote"&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV class="sasError"&gt;ERROR: Resource is write-locked by another user. File =/folders/myfolders/BootRIT/filenOLD.LST. System Error Code = 11.&lt;/DIV&gt;&lt;DIV class="sasError"&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV class="sasError"&gt;ERROR: File is in use, /folders/myfolders/BootRIT/filenOLD.LST.&lt;/DIV&gt;&lt;DIV class="sasNote"&gt;NOTE: The SAS System stopped processing this step because of errors.&lt;/DIV&gt;&lt;DIV class="sasNote"&gt;NOTE: PROCEDURE PRINTTO used (Total process time):&lt;/DIV&gt;&lt;DIV class="sasNote"&gt;real time 0.00 seconds&lt;/DIV&gt;&lt;DIV class="sasNote"&gt;cpu time 0.01 seconds&lt;/DIV&gt;&lt;DIV class="sasNote"&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV class="sasWarning"&gt;&amp;lt;br\&amp;gt;&amp;nbsp;WARNING: Maximum log size exceeded. &lt;A href="http://192.168.129.128/SASStudio/36/sasexec/submissions/0af10889-6d85-468b-8968-5f9be9fc169e/log" target="_blank"&gt;Click here to view full log.&lt;/A&gt;&lt;/DIV&gt;&lt;DIV class="sasWarning"&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV class="sasWarning"&gt;&lt;P&gt;Can someone tell me what I have done wrong and how to get the log to be written to a file?&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;/DIV&gt;&lt;PRE class="sasLog"&gt;&amp;nbsp;&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Tue, 09 Jan 2018 12:38:35 GMT</pubDate>
    <dc:creator>jacksonan123</dc:creator>
    <dc:date>2018-01-09T12:38:35Z</dc:date>
    <item>
      <title>Writing to a log file</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Writing-to-a-log-file/m-p/426053#M104951</link>
      <description>&lt;P&gt;I have been using the following code to write to a log file while running a program to avoid the log containing the output.&lt;/P&gt;&lt;DIV class="sasSource"&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV class="sasSource"&gt;&lt;SPAN&gt;proc printto log='/folders/myfolders/BootRIT/filenOLD.LST/';&lt;/SPAN&gt;&lt;/DIV&gt;&lt;P&gt;However I get this error while running SAS University edition.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;DIV class="sasSource"&gt;1 OPTIONS NONOTES NOSTIMER NOSOURCE NOSYNTAXCHECK;&lt;/DIV&gt;&lt;DIV class="sasSource"&gt;61&lt;/DIV&gt;&lt;DIV class="sasSource"&gt;62 /*PROGRAM TAKES A CONTROL FILE AND DUPLICATES IT N TIMES*/&lt;/DIV&gt;&lt;DIV class="sasSource"&gt;63 /*THE $DATA LINE IS ALSO CHANGED TO MATCH THE FILE NAME*/&lt;/DIV&gt;&lt;DIV class="sasSource"&gt;64 proc printto log='/folders/myfolders/BootRIT/filenOLD.LST/';&lt;/DIV&gt;&lt;DIV class="sasSource"&gt;65 RUN;&lt;/DIV&gt;&lt;DIV class="sasNote"&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV class="sasError"&gt;ERROR: Resource is write-locked by another user. File =/folders/myfolders/BootRIT/filenOLD.LST. System Error Code = 11.&lt;/DIV&gt;&lt;DIV class="sasError"&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV class="sasError"&gt;ERROR: File is in use, /folders/myfolders/BootRIT/filenOLD.LST.&lt;/DIV&gt;&lt;DIV class="sasNote"&gt;NOTE: The SAS System stopped processing this step because of errors.&lt;/DIV&gt;&lt;DIV class="sasNote"&gt;NOTE: PROCEDURE PRINTTO used (Total process time):&lt;/DIV&gt;&lt;DIV class="sasNote"&gt;real time 0.00 seconds&lt;/DIV&gt;&lt;DIV class="sasNote"&gt;cpu time 0.01 seconds&lt;/DIV&gt;&lt;DIV class="sasNote"&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV class="sasWarning"&gt;&amp;lt;br\&amp;gt;&amp;nbsp;WARNING: Maximum log size exceeded. &lt;A href="http://192.168.129.128/SASStudio/36/sasexec/submissions/0af10889-6d85-468b-8968-5f9be9fc169e/log" target="_blank"&gt;Click here to view full log.&lt;/A&gt;&lt;/DIV&gt;&lt;DIV class="sasWarning"&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV class="sasWarning"&gt;&lt;P&gt;Can someone tell me what I have done wrong and how to get the log to be written to a file?&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;/DIV&gt;&lt;PRE class="sasLog"&gt;&amp;nbsp;&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 09 Jan 2018 12:38:35 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Writing-to-a-log-file/m-p/426053#M104951</guid>
      <dc:creator>jacksonan123</dc:creator>
      <dc:date>2018-01-09T12:38:35Z</dc:date>
    </item>
    <item>
      <title>Re: Writing to a log file</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Writing-to-a-log-file/m-p/426064#M104955</link>
      <description>&lt;P&gt;Well, first off I assume this is a typo:&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;proc printto log='/folders/myfolders/BootRIT/filenOLD.LST/';&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;As the last / is not correct.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;What is BootRIT?&amp;nbsp; Do you have write access to it, is it being used by the system?&amp;nbsp; Try a file somewhere else:&lt;/SPAN&gt;&lt;/P&gt;
&lt;PRE&gt;proc printto log='/folders/myfolders/filenold.log';
run;&lt;/PRE&gt;
&lt;P&gt;&lt;SPAN&gt;Note the various updates I made to the code.&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 09 Jan 2018 13:11:12 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Writing-to-a-log-file/m-p/426064#M104955</guid>
      <dc:creator>RW9</dc:creator>
      <dc:date>2018-01-09T13:11:12Z</dc:date>
    </item>
    <item>
      <title>Re: Writing to a log file</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Writing-to-a-log-file/m-p/426107#M104973</link>
      <description>&lt;P&gt;Your suggested code worked.&amp;nbsp; The Bootrit was a folder that I had created.&lt;/P&gt;</description>
      <pubDate>Tue, 09 Jan 2018 14:20:04 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Writing-to-a-log-file/m-p/426107#M104973</guid>
      <dc:creator>jacksonan123</dc:creator>
      <dc:date>2018-01-09T14:20:04Z</dc:date>
    </item>
  </channel>
</rss>

