<?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 Running a bat file from SAS EG in SAS Enterprise Guide</title>
    <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/Running-a-bat-file-from-SAS-EG/m-p/289624#M19779</link>
    <description>&lt;P&gt;I am trying to run a bat file from SAS EG and bat file has a list of SAS programs. The bat file/SAS program&amp;nbsp;seems to be executing but the SAS program doesnt create a log file. Is there any way a log file can be created?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;data&lt;/STRONG&gt; _null_;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;call system("T:\Test_Bat.bat");&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;x "T:\Test_Bat.bat";&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;run&lt;/STRONG&gt;;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;%sysexec("T:\Test_Bat.bat");&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;run&lt;/STRONG&gt;;&lt;/P&gt;</description>
    <pubDate>Thu, 04 Aug 2016 18:43:59 GMT</pubDate>
    <dc:creator>KBACHU</dc:creator>
    <dc:date>2016-08-04T18:43:59Z</dc:date>
    <item>
      <title>Running a bat file from SAS EG</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/Running-a-bat-file-from-SAS-EG/m-p/289624#M19779</link>
      <description>&lt;P&gt;I am trying to run a bat file from SAS EG and bat file has a list of SAS programs. The bat file/SAS program&amp;nbsp;seems to be executing but the SAS program doesnt create a log file. Is there any way a log file can be created?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;data&lt;/STRONG&gt; _null_;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;call system("T:\Test_Bat.bat");&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;x "T:\Test_Bat.bat";&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;run&lt;/STRONG&gt;;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;%sysexec("T:\Test_Bat.bat");&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;run&lt;/STRONG&gt;;&lt;/P&gt;</description>
      <pubDate>Thu, 04 Aug 2016 18:43:59 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/Running-a-bat-file-from-SAS-EG/m-p/289624#M19779</guid>
      <dc:creator>KBACHU</dc:creator>
      <dc:date>2016-08-04T18:43:59Z</dc:date>
    </item>
    <item>
      <title>Re: Running a bat file from SAS EG</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/Running-a-bat-file-from-SAS-EG/m-p/289632#M19782</link>
      <description>&lt;P&gt;You'd need to open up the bat file, and add a log destination to the line that invokes SAS. I think the syntax is&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;-log "C:\whatever\mylog.log"&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Tom&lt;/P&gt;</description>
      <pubDate>Thu, 04 Aug 2016 19:05:20 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/Running-a-bat-file-from-SAS-EG/m-p/289632#M19782</guid>
      <dc:creator>TomKari</dc:creator>
      <dc:date>2016-08-04T19:05:20Z</dc:date>
    </item>
    <item>
      <title>Re: Running a bat file from SAS EG</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/Running-a-bat-file-from-SAS-EG/m-p/289652#M19784</link>
      <description>A log is created by default, you might need to investigate where. You are talking about the individual SAS programs in the bat script, right?&lt;BR /&gt;&lt;BR /&gt;It sounds like an awkward way of doing things. I can there's a need for scheduling purposes to create a bat file, but why do you need to execute it from EG?</description>
      <pubDate>Thu, 04 Aug 2016 20:24:45 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/Running-a-bat-file-from-SAS-EG/m-p/289652#M19784</guid>
      <dc:creator>LinusH</dc:creator>
      <dc:date>2016-08-04T20:24:45Z</dc:date>
    </item>
    <item>
      <title>Re: Running a bat file from SAS EG</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/Running-a-bat-file-from-SAS-EG/m-p/289729#M19795</link>
      <description>&lt;PRE&gt;
Try this one . after executing , open log.txt

x "T:\Test_Bat.bat &amp;gt; c:\temp\log.txt ";

&lt;/PRE&gt;</description>
      <pubDate>Fri, 05 Aug 2016 06:43:17 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/Running-a-bat-file-from-SAS-EG/m-p/289729#M19795</guid>
      <dc:creator>Ksharp</dc:creator>
      <dc:date>2016-08-05T06:43:17Z</dc:date>
    </item>
  </channel>
</rss>

