<?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: Rerouting log and output to another location in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Rerouting-log-and-output-to-another-location/m-p/432586#M107152</link>
    <description>&lt;P&gt;Thanks Shmuel,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;That is true, DM doesn't work in Batch mode. I started googling the altlog option you proposed and I can't figure out how to get it to work. Can you give me a simple example of how I would add this to my code? Thank you.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Lorena&lt;/P&gt;</description>
    <pubDate>Wed, 31 Jan 2018 02:03:32 GMT</pubDate>
    <dc:creator>LOLO</dc:creator>
    <dc:date>2018-01-31T02:03:32Z</dc:date>
    <item>
      <title>Rerouting log and output to another location</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Rerouting-log-and-output-to-another-location/m-p/432468#M107119</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I run my programs in batch mode and I also use macros within the program that reference the pathnames and program name. The goal is to run the programs from a particular location and send the output and log files to another location on our server. I don't want to use the proc printto method because I have to put that at the top of the program and would not be able to use the macros I create later in the program. I want to use the DM method but it is not working. I have the following piece of code at the bottom of the program.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;dm 'log ; "pathname\programname.log" ' ;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I don't get an error but the file does not show up in the appropriate folder. What am I doing wrong??&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;L&lt;/P&gt;</description>
      <pubDate>Tue, 30 Jan 2018 19:47:10 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Rerouting-log-and-output-to-another-location/m-p/432468#M107119</guid>
      <dc:creator>LOLO</dc:creator>
      <dc:date>2018-01-30T19:47:10Z</dc:date>
    </item>
    <item>
      <title>Re: Rerouting log and output to another location</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Rerouting-log-and-output-to-another-location/m-p/432472#M107122</link>
      <description>&lt;P&gt;Use ALTLOG=&amp;lt;path and name&amp;gt; on the sas execution line in your script.&lt;/P&gt;</description>
      <pubDate>Tue, 30 Jan 2018 19:51:41 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Rerouting-log-and-output-to-another-location/m-p/432472#M107122</guid>
      <dc:creator>Shmuel</dc:creator>
      <dc:date>2018-01-30T19:51:41Z</dc:date>
    </item>
    <item>
      <title>Re: Rerouting log and output to another location</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Rerouting-log-and-output-to-another-location/m-p/432473#M107123</link>
      <description>As much as I remeber you can't use DM in batch mode.</description>
      <pubDate>Tue, 30 Jan 2018 19:53:13 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Rerouting-log-and-output-to-another-location/m-p/432473#M107123</guid>
      <dc:creator>Shmuel</dc:creator>
      <dc:date>2018-01-30T19:53:13Z</dc:date>
    </item>
    <item>
      <title>Re: Rerouting log and output to another location</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Rerouting-log-and-output-to-another-location/m-p/432586#M107152</link>
      <description>&lt;P&gt;Thanks Shmuel,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;That is true, DM doesn't work in Batch mode. I started googling the altlog option you proposed and I can't figure out how to get it to work. Can you give me a simple example of how I would add this to my code? Thank you.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Lorena&lt;/P&gt;</description>
      <pubDate>Wed, 31 Jan 2018 02:03:32 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Rerouting-log-and-output-to-another-location/m-p/432586#M107152</guid>
      <dc:creator>LOLO</dc:creator>
      <dc:date>2018-01-31T02:03:32Z</dc:date>
    </item>
    <item>
      <title>Re: Rerouting log and output to another location</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Rerouting-log-and-output-to-another-location/m-p/432616#M107162</link>
      <description>&lt;P&gt;Depending on OS&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;In windows&lt;/P&gt;
&lt;PRE&gt;C:\Program Files\Sas\Sas 9.1\sas.exe -SYSIN Pgm1.sas -altlog='&amp;lt;path and log file name&amp;gt;' .... more options ....&lt;/PRE&gt;
&lt;P&gt;If you have issues - post your script, running sas batch.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 31 Jan 2018 06:15:41 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Rerouting-log-and-output-to-another-location/m-p/432616#M107162</guid>
      <dc:creator>Shmuel</dc:creator>
      <dc:date>2018-01-31T06:15:41Z</dc:date>
    </item>
    <item>
      <title>Re: Rerouting log and output to another location</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Rerouting-log-and-output-to-another-location/m-p/432621#M107166</link>
      <description>&lt;P&gt;For SASBASE 9.4 in Windows this is how it will work:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&amp;lt;SASBASE instaled path&amp;gt;\sas.exe -CONFIG &amp;lt;SASBASE instaled path&amp;gt;\nls\en\sasv9.CFG -sysin &amp;lt;prgram with path name&amp;gt; -autoexec &amp;lt;if any with path name&amp;gt; -log &amp;lt;log path with log name&amp;gt;&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;the last tag will print the logs where you want it to print. And it will print the batch log. Not Applog.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Hope this helps.&lt;/P&gt;</description>
      <pubDate>Wed, 31 Jan 2018 07:05:25 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Rerouting-log-and-output-to-another-location/m-p/432621#M107166</guid>
      <dc:creator>Satish_Parida</dc:creator>
      <dc:date>2018-01-31T07:05:25Z</dc:date>
    </item>
  </channel>
</rss>

