<?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: How to run BATCH file(XYZ.bat) from SAS Program in SAS EG 9.4 in New SAS User</title>
    <link>https://communities.sas.com/t5/New-SAS-User/How-to-run-BATCH-file-XYZ-bat-from-SAS-Program-in-SAS-EG-9-4/m-p/553342#M9360</link>
    <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/10467"&gt;@sumitpratap&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;Running Batch file from SAS program is a must. I can't explain the full problem here. But Alternative solution will not work for me. Anyways, thanks for your time.&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;Still haven't provided any logs or details of what goes wrong.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Where are you writing the batch file? On your computer or the EG Server? Do the paths for all the generated code and the log point to things on your computer or the EG server? Your EG sessions may very well not see the paths if any of them refer to your computer. They may also point to places on the EG server where you do not have read, execute and/or delete permissions if the paths are valid.&lt;/P&gt;</description>
    <pubDate>Tue, 23 Apr 2019 16:39:14 GMT</pubDate>
    <dc:creator>ballardw</dc:creator>
    <dc:date>2019-04-23T16:39:14Z</dc:date>
    <item>
      <title>How to run BATCH file(XYZ.bat) from SAS Program in SAS EG 9.4</title>
      <link>https://communities.sas.com/t5/New-SAS-User/How-to-run-BATCH-file-XYZ-bat-from-SAS-Program-in-SAS-EG-9-4/m-p/553167#M9331</link>
      <description>&lt;P&gt;I have a batch file(&lt;STRONG&gt;xyz.bat&lt;/STRONG&gt;) which is doing 3 things:&lt;/P&gt;
&lt;P&gt;1-Running &lt;STRONG&gt;program.sas&lt;/STRONG&gt; in Batch mode&lt;/P&gt;
&lt;P&gt;2-Running &lt;STRONG&gt;logcheck.sas&lt;/STRONG&gt; macro in Batch mode&lt;/P&gt;
&lt;P&gt;3-delete &lt;STRONG&gt;program.log&lt;/STRONG&gt; file in Batch mode&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Above Batch file(&lt;STRONG&gt;xyz.bat&lt;/STRONG&gt;) is generated by &lt;STRONG&gt;Program2.SAS&lt;/STRONG&gt;. Rather than running the BATCH file by using double click.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I just want to run it from SAS Program(&lt;STRONG&gt;Program2.SAS&lt;/STRONG&gt;) itself.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;First option to run batch file from&amp;nbsp;Program2.SAS&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;options noxwait noxsync;&lt;/P&gt;
&lt;P&gt;data _null_;&lt;BR /&gt;X 'C:\path\temp-batch.bat';&lt;BR /&gt;run;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;Second option to run batch file from&amp;nbsp;Program2.SAS&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;options noxwait noxsync;&lt;BR /&gt;data _null_;&lt;BR /&gt;X " 'C:\Windows\System32\cmd.exe' 'C:\path\temp-batch.bat' ";&lt;BR /&gt;run;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Nothing is working. Please note that there is no syntax error in the program.&lt;/P&gt;</description>
      <pubDate>Tue, 23 Apr 2019 10:42:57 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/How-to-run-BATCH-file-XYZ-bat-from-SAS-Program-in-SAS-EG-9-4/m-p/553167#M9331</guid>
      <dc:creator>sumitpratap</dc:creator>
      <dc:date>2019-04-23T10:42:57Z</dc:date>
    </item>
    <item>
      <title>Re: How to run BATCH file(XYZ.bat) from SAS Program in SAS EG 9.4</title>
      <link>https://communities.sas.com/t5/New-SAS-User/How-to-run-BATCH-file-XYZ-bat-from-SAS-Program-in-SAS-EG-9-4/m-p/553194#M9334</link>
      <description>&lt;P&gt;Hope you tried renaming the file and executed the code&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;options noxwait noxsync;

data _null_;
X 'C:\path\temp&lt;FONT color="#FF0000"&gt;_&lt;/FONT&gt;batch.bat';
run;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Tue, 23 Apr 2019 12:42:14 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/How-to-run-BATCH-file-XYZ-bat-from-SAS-Program-in-SAS-EG-9-4/m-p/553194#M9334</guid>
      <dc:creator>Jagadishkatam</dc:creator>
      <dc:date>2019-04-23T12:42:14Z</dc:date>
    </item>
    <item>
      <title>Re: How to run BATCH file(XYZ.bat) from SAS Program in SAS EG 9.4</title>
      <link>https://communities.sas.com/t5/New-SAS-User/How-to-run-BATCH-file-XYZ-bat-from-SAS-Program-in-SAS-EG-9-4/m-p/553196#M9335</link>
      <description>&lt;P&gt;"Nothing is working" tells us exactly this: nothing.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Why do you want to execute a batch-job running sas while you are already in a running sas-session?&lt;/P&gt;
&lt;P&gt;Why not just %include the other sas-programs?&lt;/P&gt;
&lt;P&gt;XCmd is enabled?&lt;/P&gt;</description>
      <pubDate>Tue, 23 Apr 2019 12:44:57 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/How-to-run-BATCH-file-XYZ-bat-from-SAS-Program-in-SAS-EG-9-4/m-p/553196#M9335</guid>
      <dc:creator>andreas_lds</dc:creator>
      <dc:date>2019-04-23T12:44:57Z</dc:date>
    </item>
    <item>
      <title>Re: How to run BATCH file(XYZ.bat) from SAS Program in SAS EG 9.4</title>
      <link>https://communities.sas.com/t5/New-SAS-User/How-to-run-BATCH-file-XYZ-bat-from-SAS-Program-in-SAS-EG-9-4/m-p/553200#M9336</link>
      <description>This will not work. Already tried.</description>
      <pubDate>Tue, 23 Apr 2019 12:50:17 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/How-to-run-BATCH-file-XYZ-bat-from-SAS-Program-in-SAS-EG-9-4/m-p/553200#M9336</guid>
      <dc:creator>sumitpratap</dc:creator>
      <dc:date>2019-04-23T12:50:17Z</dc:date>
    </item>
    <item>
      <title>Re: How to run BATCH file(XYZ.bat) from SAS Program in SAS EG 9.4</title>
      <link>https://communities.sas.com/t5/New-SAS-User/How-to-run-BATCH-file-XYZ-bat-from-SAS-Program-in-SAS-EG-9-4/m-p/553206#M9337</link>
      <description>&lt;BR /&gt;"Nothing is working" tells us exactly this: nothing.==&amp;gt; I am not able to run bacth file from SAS program.&lt;BR /&gt;&lt;BR /&gt;XCMD is enabled. no issue with that. Other commands like Copy is working fine.&lt;BR /&gt;&lt;BR /&gt;Running is batch file from SAS program is something different that running any DOS command using X statement.</description>
      <pubDate>Tue, 23 Apr 2019 12:54:20 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/How-to-run-BATCH-file-XYZ-bat-from-SAS-Program-in-SAS-EG-9-4/m-p/553206#M9337</guid>
      <dc:creator>sumitpratap</dc:creator>
      <dc:date>2019-04-23T12:54:20Z</dc:date>
    </item>
    <item>
      <title>Re: How to run BATCH file(XYZ.bat) from SAS Program in SAS EG 9.4</title>
      <link>https://communities.sas.com/t5/New-SAS-User/How-to-run-BATCH-file-XYZ-bat-from-SAS-Program-in-SAS-EG-9-4/m-p/553209#M9338</link>
      <description>&lt;P&gt;Don't use the x statement, as it does not provide any diagnostic information that can help you in solving issues. Use the filename pipe method to run external commands:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;filename oscmd pipe "C:\path\temp-batch.bat 2&amp;gt;&amp;amp;1";

data _null_;
infile oscmd;
input;
put _infile_;
run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;Look at your log to see all responses you get back from the operating system.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 23 Apr 2019 13:01:04 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/How-to-run-BATCH-file-XYZ-bat-from-SAS-Program-in-SAS-EG-9-4/m-p/553209#M9338</guid>
      <dc:creator>Kurt_Bremser</dc:creator>
      <dc:date>2019-04-23T13:01:04Z</dc:date>
    </item>
    <item>
      <title>Re: How to run BATCH file(XYZ.bat) from SAS Program in SAS EG 9.4</title>
      <link>https://communities.sas.com/t5/New-SAS-User/How-to-run-BATCH-file-XYZ-bat-from-SAS-Program-in-SAS-EG-9-4/m-p/553248#M9341</link>
      <description>Not helping. Note that Batch file don't have any issue. &lt;BR /&gt;Suggested program doesn't write anything to log and goes into running mode for too long(I have waited for 15-20 mins).&lt;BR /&gt;&lt;BR /&gt;Problem is, SAS program is not able to run batch file.</description>
      <pubDate>Tue, 23 Apr 2019 13:40:06 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/How-to-run-BATCH-file-XYZ-bat-from-SAS-Program-in-SAS-EG-9-4/m-p/553248#M9341</guid>
      <dc:creator>sumitpratap</dc:creator>
      <dc:date>2019-04-23T13:40:06Z</dc:date>
    </item>
    <item>
      <title>Re: How to run BATCH file(XYZ.bat) from SAS Program in SAS EG 9.4</title>
      <link>https://communities.sas.com/t5/New-SAS-User/How-to-run-BATCH-file-XYZ-bat-from-SAS-Program-in-SAS-EG-9-4/m-p/553265#M9344</link>
      <description>&lt;P&gt;So, you run the code suggested by &lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/11562"&gt;@Kurt_Bremser&lt;/a&gt;&amp;nbsp; and nothing was written to the sas log? And "program.sas" doesn't write a log, too?&lt;/P&gt;</description>
      <pubDate>Tue, 23 Apr 2019 14:10:03 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/How-to-run-BATCH-file-XYZ-bat-from-SAS-Program-in-SAS-EG-9-4/m-p/553265#M9344</guid>
      <dc:creator>andreas_lds</dc:creator>
      <dc:date>2019-04-23T14:10:03Z</dc:date>
    </item>
    <item>
      <title>Re: How to run BATCH file(XYZ.bat) from SAS Program in SAS EG 9.4</title>
      <link>https://communities.sas.com/t5/New-SAS-User/How-to-run-BATCH-file-XYZ-bat-from-SAS-Program-in-SAS-EG-9-4/m-p/553293#M9348</link>
      <description>nops. Why don't you create a sample batch and try to run it from SAS program. then tell me if you are able to run.</description>
      <pubDate>Tue, 23 Apr 2019 14:57:54 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/How-to-run-BATCH-file-XYZ-bat-from-SAS-Program-in-SAS-EG-9-4/m-p/553293#M9348</guid>
      <dc:creator>sumitpratap</dc:creator>
      <dc:date>2019-04-23T14:57:54Z</dc:date>
    </item>
    <item>
      <title>Re: How to run BATCH file(XYZ.bat) from SAS Program in SAS EG 9.4</title>
      <link>https://communities.sas.com/t5/New-SAS-User/How-to-run-BATCH-file-XYZ-bat-from-SAS-Program-in-SAS-EG-9-4/m-p/553301#M9349</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/10467"&gt;@sumitpratap&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;
&lt;P&gt;I have a batch file(&lt;STRONG&gt;xyz.bat&lt;/STRONG&gt;) which is doing 3 things:&lt;/P&gt;
&lt;P&gt;1-Running &lt;STRONG&gt;program.sas&lt;/STRONG&gt; in Batch mode&lt;/P&gt;
&lt;P&gt;2-Running &lt;STRONG&gt;logcheck.sas&lt;/STRONG&gt; macro in Batch mode&lt;/P&gt;
&lt;P&gt;3-delete &lt;STRONG&gt;program.log&lt;/STRONG&gt; file in Batch mode&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Above Batch file(&lt;STRONG&gt;xyz.bat&lt;/STRONG&gt;) is generated by &lt;STRONG&gt;Program2.SAS&lt;/STRONG&gt;. Rather than running the BATCH file by using double click.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I just want to run it from SAS Program(&lt;STRONG&gt;Program2.SAS&lt;/STRONG&gt;) itself.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;First option to run batch file from&amp;nbsp;Program2.SAS&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;options noxwait noxsync;&lt;/P&gt;
&lt;P&gt;data _null_;&lt;BR /&gt;X 'C:\path\temp-batch.bat';&lt;BR /&gt;run;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;Second option to run batch file from&amp;nbsp;Program2.SAS&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;options noxwait noxsync;&lt;BR /&gt;data _null_;&lt;BR /&gt;X " 'C:\Windows\System32\cmd.exe' 'C:\path\temp-batch.bat' ";&lt;BR /&gt;run;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Nothing is working. Please note that there is no syntax error in the program.&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;If a program file is a SAS program you can reference it with %include. No reason to place into a separate "batch file". You can create the text program inside the program that calls it.&lt;/P&gt;
&lt;P&gt;Brief example:&lt;/P&gt;
&lt;PRE&gt;data _null_;
   file "c:\exampleprog.sas";
   put "Proc print data=sashelp.class;run;";
run;

%include "c:\exampleprog.sas";&lt;/PRE&gt;
&lt;P&gt;You might be ahead of the game to route the log as needed to a separate or null file instead of worrying about cleaning up the created log. There a fair number of system options as well as Proc Printto to redirect or control what appears in the log. If you are "deleting" the log without looking at it, then options about creating or contents may be in order.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;BTW, &lt;FONT color="#ff0000"&gt;when something does not work please post the code you submitted and the log to show us what actually happened. &lt;/FONT&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 23 Apr 2019 15:13:04 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/How-to-run-BATCH-file-XYZ-bat-from-SAS-Program-in-SAS-EG-9-4/m-p/553301#M9349</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2019-04-23T15:13:04Z</dc:date>
    </item>
    <item>
      <title>Re: How to run BATCH file(XYZ.bat) from SAS Program in SAS EG 9.4</title>
      <link>https://communities.sas.com/t5/New-SAS-User/How-to-run-BATCH-file-XYZ-bat-from-SAS-Program-in-SAS-EG-9-4/m-p/553304#M9350</link>
      <description>&lt;P&gt;First of all, create a sample batch file that creates output (eg echo "Test"), and run that, and see if you get the output in the SAS log of the calling program.&lt;/P&gt;
&lt;P&gt;Once that is verified, make sure that your second SAS program is called from the batch file in a way so that it writes a dedicated log with&lt;/P&gt;
&lt;PRE&gt;-logparms "write=immediate"&lt;/PRE&gt;
&lt;P&gt;in order to watch its progress.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If in doubt,&amp;nbsp;post&amp;nbsp;the log from my suggested data _null_ step.&lt;/P&gt;</description>
      <pubDate>Tue, 23 Apr 2019 15:14:30 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/How-to-run-BATCH-file-XYZ-bat-from-SAS-Program-in-SAS-EG-9-4/m-p/553304#M9350</guid>
      <dc:creator>Kurt_Bremser</dc:creator>
      <dc:date>2019-04-23T15:14:30Z</dc:date>
    </item>
    <item>
      <title>Re: How to run BATCH file(XYZ.bat) from SAS Program in SAS EG 9.4</title>
      <link>https://communities.sas.com/t5/New-SAS-User/How-to-run-BATCH-file-XYZ-bat-from-SAS-Program-in-SAS-EG-9-4/m-p/553329#M9358</link>
      <description>Running Batch file from SAS program is a must. I can't explain the full problem here. But Alternative solution will not work for me. Anyways, thanks for your time.</description>
      <pubDate>Tue, 23 Apr 2019 16:13:57 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/How-to-run-BATCH-file-XYZ-bat-from-SAS-Program-in-SAS-EG-9-4/m-p/553329#M9358</guid>
      <dc:creator>sumitpratap</dc:creator>
      <dc:date>2019-04-23T16:13:57Z</dc:date>
    </item>
    <item>
      <title>Re: How to run BATCH file(XYZ.bat) from SAS Program in SAS EG 9.4</title>
      <link>https://communities.sas.com/t5/New-SAS-User/How-to-run-BATCH-file-XYZ-bat-from-SAS-Program-in-SAS-EG-9-4/m-p/553342#M9360</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/10467"&gt;@sumitpratap&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;Running Batch file from SAS program is a must. I can't explain the full problem here. But Alternative solution will not work for me. Anyways, thanks for your time.&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;Still haven't provided any logs or details of what goes wrong.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Where are you writing the batch file? On your computer or the EG Server? Do the paths for all the generated code and the log point to things on your computer or the EG server? Your EG sessions may very well not see the paths if any of them refer to your computer. They may also point to places on the EG server where you do not have read, execute and/or delete permissions if the paths are valid.&lt;/P&gt;</description>
      <pubDate>Tue, 23 Apr 2019 16:39:14 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/How-to-run-BATCH-file-XYZ-bat-from-SAS-Program-in-SAS-EG-9-4/m-p/553342#M9360</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2019-04-23T16:39:14Z</dc:date>
    </item>
    <item>
      <title>Re: How to run BATCH file(XYZ.bat) from SAS Program in SAS EG 9.4</title>
      <link>https://communities.sas.com/t5/New-SAS-User/How-to-run-BATCH-file-XYZ-bat-from-SAS-Program-in-SAS-EG-9-4/m-p/553389#M9366</link>
      <description>&lt;P&gt;Note that there isn't really an EG server. There might be a SAS server that EG is using to run the SAS code it creates.&amp;nbsp;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;In your EG session you can pick which server you are using to run your SAS code.&amp;nbsp; If you have SAS installed on the same machine as EG is runnng on then the SAS code might be running on the same machine as EG.&amp;nbsp; But the SAS server could just as likely be using a different operating system than the PC you are using to run EG. It might even be using a different userid than your PC uses to connect to your local network.&lt;/P&gt;</description>
      <pubDate>Tue, 23 Apr 2019 19:30:01 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/How-to-run-BATCH-file-XYZ-bat-from-SAS-Program-in-SAS-EG-9-4/m-p/553389#M9366</guid>
      <dc:creator>Tom</dc:creator>
      <dc:date>2019-04-23T19:30:01Z</dc:date>
    </item>
    <item>
      <title>Re: How to run BATCH file(XYZ.bat) from SAS Program in SAS EG 9.4</title>
      <link>https://communities.sas.com/t5/New-SAS-User/How-to-run-BATCH-file-XYZ-bat-from-SAS-Program-in-SAS-EG-9-4/m-p/553455#M9388</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/159"&gt;@Tom&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;
&lt;P&gt;Note that there isn't really an EG server. There might be a SAS server that EG is using to run the SAS code it creates.&amp;nbsp;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;In your EG session you can pick which server you are using to run your SAS code.&amp;nbsp; If you have SAS installed on the same machine as EG is runnng on then the SAS code might be running on the same machine as EG.&amp;nbsp; But the SAS server could just as likely be using a different operating system than the PC you are using to run EG. It might even be using a different userid than your PC uses to connect to your local network.&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;I was using the term "EG server" to encourage the OP to look at the paths and set ups as you mention but probably shouldn't have on second thought.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 23 Apr 2019 22:23:37 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/How-to-run-BATCH-file-XYZ-bat-from-SAS-Program-in-SAS-EG-9-4/m-p/553455#M9388</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2019-04-23T22:23:37Z</dc:date>
    </item>
    <item>
      <title>Re: How to run BATCH file(XYZ.bat) from SAS Program in SAS EG 9.4</title>
      <link>https://communities.sas.com/t5/New-SAS-User/How-to-run-BATCH-file-XYZ-bat-from-SAS-Program-in-SAS-EG-9-4/m-p/553525#M9392</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/10467"&gt;@sumitpratap&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;nops. Why don't you create a sample batch and try to run it from SAS program. then tell me if you are able to run.&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;No problem, works as expected:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;NOTE: Writing HTML(EGHTML) Body file: EGHTML
24         
25         GOPTIONS ACCESSIBLE;
26         filename oscmd pipe "b:\test.bat 2&amp;gt;&amp;amp;1";
27         
28         data _null_;
29            infile oscmd;
30            input;
31         
32            put _infile_;
33         run;

NOTE: The infile OSCMD is:
      Unnamed Pipe Access Device,
      PROCESS=b:\test.bat 2&amp;gt;&amp;amp;1,
      RECFM=V,LRECL=32767


SASApp_Dir&amp;gt;echo "Test" 
"Test"
NOTE: 3 records were read from the infile OSCMD.
      The minimum record length was 0.
      The maximum record length was 36.
NOTE: DATA statement used (Total process time):
      real time           0.03 seconds
      cpu time            0.00 seconds&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Wed, 24 Apr 2019 05:51:16 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/How-to-run-BATCH-file-XYZ-bat-from-SAS-Program-in-SAS-EG-9-4/m-p/553525#M9392</guid>
      <dc:creator>andreas_lds</dc:creator>
      <dc:date>2019-04-24T05:51:16Z</dc:date>
    </item>
    <item>
      <title>Re: How to run BATCH file(XYZ.bat) from SAS Program in SAS EG 9.4</title>
      <link>https://communities.sas.com/t5/New-SAS-User/How-to-run-BATCH-file-XYZ-bat-from-SAS-Program-in-SAS-EG-9-4/m-p/740927#M29100</link>
      <description>&lt;P&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/10467"&gt;@sumitpratap&lt;/a&gt;&amp;nbsp;,&amp;nbsp;&lt;SPAN&gt;I had a similar challenge trying to execute R code after my SAS code finished running. This approach worked for me:&lt;/SPAN&gt;&lt;/P&gt;&lt;LI-CODE lang="sas"&gt;data _null_;
  infile 'P: &amp;amp; "P:\Some Folder\Another-Folder\And Another Folder\instructions to run 7-Zip or R script.bat" 2&amp;gt;&amp;amp;1' pipe;
  input;
  putlog _infile_;
run;&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Credits:&amp;nbsp;&lt;/SPAN&gt;&lt;A href="https://stackoverflow.com/questions/51957935/executing-bat-file-via-sas" target="_blank" rel="nofollow noopener noreferrer"&gt;https://stackoverflow.com/questions/51957935/executing-bat-file-via-sas&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 12 May 2021 20:08:18 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/How-to-run-BATCH-file-XYZ-bat-from-SAS-Program-in-SAS-EG-9-4/m-p/740927#M29100</guid>
      <dc:creator>avz</dc:creator>
      <dc:date>2021-05-12T20:08:18Z</dc:date>
    </item>
  </channel>
</rss>

