<?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: Getting total log written to different directory in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Getting-total-log-written-to-different-directory/m-p/749425#M235495</link>
    <description>&lt;P&gt;If this is something you run in batch, use the&lt;/P&gt;
&lt;PRE&gt;-log&lt;/PRE&gt;
&lt;P&gt;option on the commandline.&lt;/P&gt;</description>
    <pubDate>Tue, 22 Jun 2021 07:19:28 GMT</pubDate>
    <dc:creator>Kurt_Bremser</dc:creator>
    <dc:date>2021-06-22T07:19:28Z</dc:date>
    <item>
      <title>Getting total log written to different directory</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Getting-total-log-written-to-different-directory/m-p/749176#M235363</link>
      <description>&lt;P&gt;Hi I am trying to to get the entire log of my sas program to go to the specified directory .&amp;nbsp; I coded the below: However some of the log is still being written to the current directory.&amp;nbsp; How do i prevent this?&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;%let fileTimeStamp = %sysfunc(date(), yymmddn8.);
filename valldrpt "/workspace/sas/chd_proc_auto/log/loadrpt_&amp;amp;fileTimeStamp";

filename chdldlog "/workspace/sas/chd_proc_auto/log/chdlog_&amp;amp;fileTimeStamp";

proc printto log=chdldlog new;
run;
&lt;BR /&gt;
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Mon, 21 Jun 2021 03:35:55 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Getting-total-log-written-to-different-directory/m-p/749176#M235363</guid>
      <dc:creator>Gayle</dc:creator>
      <dc:date>2021-06-21T03:35:55Z</dc:date>
    </item>
    <item>
      <title>Re: Getting total log written to different directory</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Getting-total-log-written-to-different-directory/m-p/749177#M235364</link>
      <description>&lt;P&gt;Anything after the &lt;FONT face="courier new,courier"&gt;proc printto&lt;/FONT&gt; should be printed in the file specified.&lt;/P&gt;</description>
      <pubDate>Mon, 21 Jun 2021 03:58:31 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Getting-total-log-written-to-different-directory/m-p/749177#M235364</guid>
      <dc:creator>ChrisNZ</dc:creator>
      <dc:date>2021-06-21T03:58:31Z</dc:date>
    </item>
    <item>
      <title>Re: Getting total log written to different directory</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Getting-total-log-written-to-different-directory/m-p/749194#M235374</link>
      <description>Do you have proc printto; run; at the end of your program?</description>
      <pubDate>Mon, 21 Jun 2021 07:34:47 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Getting-total-log-written-to-different-directory/m-p/749194#M235374</guid>
      <dc:creator>tarheel13</dc:creator>
      <dc:date>2021-06-21T07:34:47Z</dc:date>
    </item>
    <item>
      <title>Re: Getting total log written to different directory</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Getting-total-log-written-to-different-directory/m-p/749195#M235375</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;
&lt;P&gt;Maybe the ALTLOG option is an option here?&lt;/P&gt;
&lt;P&gt;&lt;A href="https://documentation.sas.com/doc/en/pgmsascdc/9.4_3.5/hostunx/p10cborm89irzdn1m5y3o4hfw1g6.htm" target="_blank"&gt;https://documentation.sas.com/doc/en/pgmsascdc/9.4_3.5/hostunx/p10cborm89irzdn1m5y3o4hfw1g6.htm&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Bart&lt;/P&gt;</description>
      <pubDate>Mon, 21 Jun 2021 07:36:26 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Getting-total-log-written-to-different-directory/m-p/749195#M235375</guid>
      <dc:creator>yabwon</dc:creator>
      <dc:date>2021-06-21T07:36:26Z</dc:date>
    </item>
    <item>
      <title>Re: Getting total log written to different directory</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Getting-total-log-written-to-different-directory/m-p/749277#M235417</link>
      <description>&lt;P&gt;yes, however the portion where I define the log location come out in the current directory not the specified log directory&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;1          %let fileTimeStamp = %sysfunc(date(), yymmddn8.);
2          filename valldrpt "/workspace/chd_proc_auto/log/loadrpt_&amp;amp;fileTimeStamp";
3
4          filename chdldlog "/workspace/chd_proc_auto/log/chdlog_&amp;amp;fileTimeStamp";
5
6          proc printto log=chdldlog new;
7          run;
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Mon, 21 Jun 2021 15:18:10 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Getting-total-log-written-to-different-directory/m-p/749277#M235417</guid>
      <dc:creator>Gayle</dc:creator>
      <dc:date>2021-06-21T15:18:10Z</dc:date>
    </item>
    <item>
      <title>Re: Getting total log written to different directory</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Getting-total-log-written-to-different-directory/m-p/749419#M235492</link>
      <description>&lt;P&gt;&lt;EM&gt;&amp;gt;&amp;nbsp;the portion where I define the log location come out in the current directory&lt;/EM&gt;&lt;/P&gt;
&lt;P&gt;Yes because the log is not redirected yet.&lt;/P&gt;
&lt;P&gt;Either redirect the log for the whole session (see&amp;nbsp;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/35763"&gt;@yabwon&lt;/a&gt;&amp;nbsp;'s tip) or start the session with options&amp;nbsp;NONOTES NOSOURCE and set these after the proc printto.&lt;/P&gt;</description>
      <pubDate>Tue, 22 Jun 2021 06:32:11 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Getting-total-log-written-to-different-directory/m-p/749419#M235492</guid>
      <dc:creator>ChrisNZ</dc:creator>
      <dc:date>2021-06-22T06:32:11Z</dc:date>
    </item>
    <item>
      <title>Re: Getting total log written to different directory</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Getting-total-log-written-to-different-directory/m-p/749425#M235495</link>
      <description>&lt;P&gt;If this is something you run in batch, use the&lt;/P&gt;
&lt;PRE&gt;-log&lt;/PRE&gt;
&lt;P&gt;option on the commandline.&lt;/P&gt;</description>
      <pubDate>Tue, 22 Jun 2021 07:19:28 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Getting-total-log-written-to-different-directory/m-p/749425#M235495</guid>
      <dc:creator>Kurt_Bremser</dc:creator>
      <dc:date>2021-06-22T07:19:28Z</dc:date>
    </item>
    <item>
      <title>Re: Getting total log written to different directory</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Getting-total-log-written-to-different-directory/m-p/750205#M235915</link>
      <description>&lt;P&gt;I put the&amp;nbsp;OPTIONS NONOTES NOSOURCE; but I still get a .log file in the current directory .&amp;nbsp; Should I put it at the top of my script as below?&amp;nbsp; That is what I did&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;  1 OPTIONS NONOTES NOSOURCE;
  2 %let fileTimeStamp = %sysfunc(date(), yymmddn8.);
  3
  4 filename valldrpt "/workspace/sas/chd_proc_auto/log/loadrpt_&amp;amp;fileTimeStamp";
  5 filename chdldlog "/workspace/sas/chd_proc_auto/log/chdlog_&amp;amp;fileTimeStamp";
  6 proc printto log=chdldlog new;
  7 run;
  8
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Thu, 24 Jun 2021 14:00:41 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Getting-total-log-written-to-different-directory/m-p/750205#M235915</guid>
      <dc:creator>Gayle</dc:creator>
      <dc:date>2021-06-24T14:00:41Z</dc:date>
    </item>
    <item>
      <title>Re: Getting total log written to different directory</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Getting-total-log-written-to-different-directory/m-p/750362#M236016</link>
      <description>&lt;P&gt;&lt;EM&gt;&amp;gt;&amp;nbsp;I put the&amp;nbsp;OPTIONS NONOTES NOSOURCE; but I still get a .log file in the current directory&amp;nbsp;&lt;/EM&gt;&lt;/P&gt;
&lt;P&gt;Yes, you'll get that one line in the unredirected log.&lt;/P&gt;
&lt;P&gt;You need to set the options in a location that does not output to the log: the config file.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Two notes:&lt;/P&gt;
&lt;P&gt;- The log file will get overwritten with each run, so it's really a small impact to have a small file in a folder.&lt;/P&gt;
&lt;P&gt;- If you really want all the log redirected at start-up, you should use start-up options: LOG or ALTLOG. See &lt;A href="https://documentation.sas.com/doc/en/pgmsascdc/9.4_3.5/hostwin/n1nkm5le6xuwydn1p83k2uxhgvlx.htm" target="_self"&gt;here&lt;/A&gt;.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 24 Jun 2021 23:20:57 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Getting-total-log-written-to-different-directory/m-p/750362#M236016</guid>
      <dc:creator>ChrisNZ</dc:creator>
      <dc:date>2021-06-24T23:20:57Z</dc:date>
    </item>
  </channel>
</rss>

