<?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: Windows BATCH job log location in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Windows-BATCH-job-log-location/m-p/433602#M107512</link>
    <description>&lt;P&gt;Looks like with the task scheduler, if I specify a directory to "start in" then the log and list will go to that location, even if I don't pass the directory as parameters in the command.&lt;/P&gt;</description>
    <pubDate>Fri, 02 Feb 2018 16:53:44 GMT</pubDate>
    <dc:creator>Quentin</dc:creator>
    <dc:date>2018-02-02T16:53:44Z</dc:date>
    <item>
      <title>Windows BATCH job log location</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Windows-BATCH-job-log-location/m-p/433582#M107503</link>
      <description>&lt;P&gt;Just noticed a surprise while doing some Windows 10 testing, but was able to replicate it on Win 7.&amp;nbsp; 9.4M4.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I have a .bat which runs a batch job and does not specify a log parameter.&amp;nbsp; So the command is like:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;start "" "C:\Program Files\SASHome\SASFoundation\9.4\sas.exe" -CONFIG "C:\Program Files\SASHome\SASFoundation\9.4\nls\en\sasv9.cfg" -sysin "Q:\Junk\Test.sas"&lt;/PRE&gt;
&lt;P&gt;On windows 7, if I double click that .bat file, the log goes to Q:\Junk\Test.log as I would expect.&amp;nbsp; But if I right-click the .bat file and say "run as administrator", the log goes to c:\Windows\system32\Test.log.&amp;nbsp; Is this explained somewhere in the docs?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;On Win 10 I can only run .bat files as administrator, and the log goes to &lt;SPAN&gt;C:\Windows\System32.&amp;nbsp;&amp;nbsp;&lt;/SPAN&gt;On Windows 10 I created a scheduled task with a similar command (not a .bat file), and got the same results, log written to C:\Windows\System32.&amp;nbsp; I assume the scheduled task is running as an administrator.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;It's not a problem (and probably a good idea) for me to specify the log file when I invoke SAS.&amp;nbsp; But it was a surprise to me.&amp;nbsp; I thought the default was that a batch job log was written to the same directory as the code.&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>Fri, 02 Feb 2018 15:51:09 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Windows-BATCH-job-log-location/m-p/433582#M107503</guid>
      <dc:creator>Quentin</dc:creator>
      <dc:date>2018-02-02T15:51:09Z</dc:date>
    </item>
    <item>
      <title>Re: Windows BATCH job log location</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Windows-BATCH-job-log-location/m-p/433602#M107512</link>
      <description>&lt;P&gt;Looks like with the task scheduler, if I specify a directory to "start in" then the log and list will go to that location, even if I don't pass the directory as parameters in the command.&lt;/P&gt;</description>
      <pubDate>Fri, 02 Feb 2018 16:53:44 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Windows-BATCH-job-log-location/m-p/433602#M107512</guid>
      <dc:creator>Quentin</dc:creator>
      <dc:date>2018-02-02T16:53:44Z</dc:date>
    </item>
    <item>
      <title>Re: Windows BATCH job log location</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Windows-BATCH-job-log-location/m-p/433624#M107525</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/19879"&gt;@Quentin&lt;/a&gt; wrote:&lt;BR /&gt;
&lt;P&gt;Looks like with the task scheduler, if I specify a directory to "start in" then the log and list will go to that location, even if I don't pass the directory as parameters in the command.&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;Isn't Windoze wonderful?!&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I wouldn't be surprised if this behavior changes in Windoze11, 12, ...&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I think I would go to the extra minor work to add log output to the jobs.&lt;/P&gt;</description>
      <pubDate>Fri, 02 Feb 2018 17:45:22 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Windows-BATCH-job-log-location/m-p/433624#M107525</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2018-02-02T17:45:22Z</dc:date>
    </item>
  </channel>
</rss>

