<?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: execute .exe file thru SAS and save the output in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/execute-exe-file-thru-SAS-and-save-the-output/m-p/415515#M101912</link>
    <description>&lt;P&gt;Tom,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Yes.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Wed, 22 Nov 2017 14:10:33 GMT</pubDate>
    <dc:creator>tekish</dc:creator>
    <dc:date>2017-11-22T14:10:33Z</dc:date>
    <item>
      <title>execute .exe file thru SAS and save the output</title>
      <link>https://communities.sas.com/t5/SAS-Programming/execute-exe-file-thru-SAS-and-save-the-output/m-p/413415#M101172</link>
      <description>&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Dear experst;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;How to call .exe and get as SAS dataset. when you run the .exe it gives me excel output and I want to save the excel file and process the file using SAS.&lt;/P&gt;&lt;P&gt;&lt;FONT face="Courier New" size="2"&gt;&amp;nbsp;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;data download;&lt;/P&gt;&lt;P&gt;&lt;FONT face="Courier New" size="2"&gt;infile &lt;/FONT&gt;&lt;FONT color="#800080" face="Courier New" size="2"&gt;'myfile.exe'&lt;/FONT&gt;&lt;FONT face="Courier New" size="2"&gt; pipe;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="Courier New" size="2"&gt;length A $50;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="Courier New" size="2"&gt;input A$ B c; &lt;/FONT&gt;&lt;FONT color="#008000" face="Courier New" size="2"&gt;* read from output;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="Courier New" size="2"&gt;putlog _infile_; &lt;/FONT&gt;&lt;FONT color="#008000" face="Courier New" size="2"&gt;* show it in the log;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;run;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 14 Nov 2017 17:26:05 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/execute-exe-file-thru-SAS-and-save-the-output/m-p/413415#M101172</guid>
      <dc:creator>tekish</dc:creator>
      <dc:date>2017-11-14T17:26:05Z</dc:date>
    </item>
    <item>
      <title>Re: execute .exe file thru SAS and save the output</title>
      <link>https://communities.sas.com/t5/SAS-Programming/execute-exe-file-thru-SAS-and-save-the-output/m-p/413421#M101177</link>
      <description>&lt;P&gt;infile (or filename) pipe expects text in rows, which will end up in your dataset "download" (if the output from myfile.exe is structured correctly).&lt;/P&gt;</description>
      <pubDate>Tue, 14 Nov 2017 17:41:44 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/execute-exe-file-thru-SAS-and-save-the-output/m-p/413421#M101177</guid>
      <dc:creator>Kurt_Bremser</dc:creator>
      <dc:date>2017-11-14T17:41:44Z</dc:date>
    </item>
    <item>
      <title>Re: execute .exe file thru SAS and save the output</title>
      <link>https://communities.sas.com/t5/SAS-Programming/execute-exe-file-thru-SAS-and-save-the-output/m-p/413455#M101192</link>
      <description>&lt;P&gt;KurtBremser,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;It is running with out error, but my biggest concern is how do I save the excel output from .exe. I got this message&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;NOTE: The infile&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 'myfile.exe' is:&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Unnamed Pipe Access Device,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; PROCESS=myfile.exe,&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; RECFM=V,LRECL=32727&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;NOTE: 0 records were read from the infile&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 'myfile.exe'.&lt;BR /&gt;NOTE: The data set WORK.DOWNLOAD has 0 observations and 3 variables.&lt;BR /&gt;NOTE: DATA statement used (Total process time):&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; real time&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 44.61 seconds&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; cpu time&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 0.04 seconds&lt;/P&gt;</description>
      <pubDate>Tue, 14 Nov 2017 19:20:53 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/execute-exe-file-thru-SAS-and-save-the-output/m-p/413455#M101192</guid>
      <dc:creator>tekish</dc:creator>
      <dc:date>2017-11-14T19:20:53Z</dc:date>
    </item>
    <item>
      <title>Re: execute .exe file thru SAS and save the output</title>
      <link>https://communities.sas.com/t5/SAS-Programming/execute-exe-file-thru-SAS-and-save-the-output/m-p/413458#M101193</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/51471"&gt;@tekish&lt;/a&gt; wrote:&lt;BR /&gt;
&lt;P&gt;KurtBremser,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;It is running with out error, but my biggest concern is how do I save the excel output from .exe. I got this message&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;NOTE: The infile&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 'myfile.exe' is:&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Unnamed Pipe Access Device,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; PROCESS=myfile.exe,&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; RECFM=V,LRECL=32727&lt;/P&gt;
&lt;P&gt;&lt;BR /&gt;NOTE: 0 records were read from the infile&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 'myfile.exe'.&lt;BR /&gt;NOTE: The data set WORK.DOWNLOAD has 0 observations and 3 variables.&lt;BR /&gt;NOTE: DATA statement used (Total process time):&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; real time&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 44.61 seconds&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; cpu time&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 0.04 seconds&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;Which means that myfile.exe does not produce any output that SAS can work with.&lt;/P&gt;</description>
      <pubDate>Tue, 14 Nov 2017 20:02:30 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/execute-exe-file-thru-SAS-and-save-the-output/m-p/413458#M101193</guid>
      <dc:creator>Kurt_Bremser</dc:creator>
      <dc:date>2017-11-14T20:02:30Z</dc:date>
    </item>
    <item>
      <title>Re: execute .exe file thru SAS and save the output</title>
      <link>https://communities.sas.com/t5/SAS-Programming/execute-exe-file-thru-SAS-and-save-the-output/m-p/413528#M101218</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/51471"&gt;@tekish&lt;/a&gt; wrote:&lt;BR /&gt;
&lt;P&gt;KurtBremser,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;It is running with out error, but my biggest concern is how do I save the excel output from .exe. I got this message&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;If you run the program without SAS where does the output go? Perhaps you could use the SAS X command or Call System&amp;nbsp;to run the program with parameters to save the output to a known named file, wait for the results (Xsync options), and then read that known output file.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I have to say the idea of reading spreadsheet as a data stream feels very likely to be a headache.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Something is to check on the actual file format it creates. Some programs lie and are actually creating something that Excel will open but are actually CSV (which SAS can usually handle pretty well) or html (which is poor for data interchange).&lt;/P&gt;</description>
      <pubDate>Tue, 14 Nov 2017 23:44:50 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/execute-exe-file-thru-SAS-and-save-the-output/m-p/413528#M101218</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2017-11-14T23:44:50Z</dc:date>
    </item>
    <item>
      <title>Re: execute .exe file thru SAS and save the output</title>
      <link>https://communities.sas.com/t5/SAS-Programming/execute-exe-file-thru-SAS-and-save-the-output/m-p/413563#M101245</link>
      <description>&lt;P&gt;The INPUT statement is expecting to read from the standard output generated by the command you are running in the pipe.&amp;nbsp;&amp;nbsp;For example if I run the TYPE command from a CMD window It will show me the content of a text file on the screen.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;C:\downloads&amp;gt;type file1.txt
"Hello World"

C:\downloads&amp;gt;&lt;/PRE&gt;
&lt;P&gt;From your SAS log it looks like your program does NOT write anything to the standard output.&amp;nbsp; Which is good since SAS cannot very easily read a binary file like an EXCEL spreadsheet using the INPUT statement.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Open a command window and run that command to see what data if any it write to standard output.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Is it possible that your program actually worked, but instead of directing its output to the standard output it just created an actual file somewhere on your disk?&amp;nbsp;If so then you could first run the command and then later read the file that it created in another step.&lt;/P&gt;</description>
      <pubDate>Wed, 15 Nov 2017 04:23:17 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/execute-exe-file-thru-SAS-and-save-the-output/m-p/413563#M101245</guid>
      <dc:creator>Tom</dc:creator>
      <dc:date>2017-11-15T04:23:17Z</dc:date>
    </item>
    <item>
      <title>Re: execute .exe file thru SAS and save the output</title>
      <link>https://communities.sas.com/t5/SAS-Programming/execute-exe-file-thru-SAS-and-save-the-output/m-p/415263#M101818</link>
      <description>&lt;P&gt;/****************************************************/&lt;/P&gt;&lt;P&gt;/* SAVE EXCEL FILES FROM&amp;nbsp;DOWNLOAD */&lt;/P&gt;&lt;P&gt;/***************************************************/&lt;/P&gt;&lt;P&gt;&lt;FONT color="#0000ff" face="Courier New" size="2"&gt;%LET&lt;/FONT&gt;&lt;FONT face="Courier New" size="2"&gt; OUT=C:\DOWNLOAD\;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#0000ff" face="Courier New" size="2"&gt;%LET&lt;/FONT&gt;&lt;FONT face="Courier New" size="2"&gt; REPORT=BOOK1;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#0000ff" face="Courier New" size="2"&gt;FILENAME&lt;/FONT&gt;&lt;FONT face="Courier New" size="2"&gt; COMMANDS &lt;/FONT&gt;&lt;FONT color="#0000ff" face="Courier New" size="2"&gt;DDE&lt;/FONT&gt; &lt;FONT color="#800080" face="Courier New" size="2"&gt;'EXCEL|SYSTEM'&lt;/FONT&gt;&lt;FONT face="Courier New" size="2"&gt;;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#000080" face="Courier New" size="2"&gt;&lt;STRONG&gt;RUN&lt;/STRONG&gt;&lt;/FONT&gt;&lt;FONT face="Courier New" size="2"&gt;;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#0000ff" face="Courier New" size="2"&gt;%LET&lt;/FONT&gt;&lt;FONT face="Courier New" size="2"&gt; FILE = &amp;amp;OUT.&amp;amp;REPORT..XLSX;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#000080" face="Courier New" size="2"&gt;&lt;STRONG&gt;RUN&lt;/STRONG&gt;&lt;/FONT&gt;&lt;FONT face="Courier New" size="2"&gt;;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#000080" face="Courier New" size="2"&gt;&lt;STRONG&gt;DATA&lt;/STRONG&gt;&lt;/FONT&gt; &lt;FONT color="#0000ff" face="Courier New" size="2"&gt;_NULL_&lt;/FONT&gt;&lt;FONT face="Courier New" size="2"&gt;;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#0000ff" face="Courier New" size="2"&gt;FILE&lt;/FONT&gt;&lt;FONT face="Courier New" size="2"&gt; COMMANDS;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#0000ff" face="Courier New" size="2"&gt;PUT&lt;/FONT&gt; &lt;FONT color="#800080" face="Courier New" size="2"&gt;"[SAVE.AS(""&amp;amp;FILE"")]"&lt;/FONT&gt;&lt;FONT face="Courier New" size="2"&gt;;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#0000ff" face="Courier New" size="2"&gt;PUT&lt;/FONT&gt; &lt;FONT color="#800080" face="Courier New" size="2"&gt;'[QUIT]'&lt;/FONT&gt;&lt;FONT face="Courier New" size="2"&gt;;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#000080" face="Courier New" size="2"&gt;&lt;STRONG&gt;RUN&lt;/STRONG&gt;&lt;/FONT&gt;&lt;FONT face="Courier New" size="2"&gt;;&lt;/FONT&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 21 Nov 2017 17:38:57 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/execute-exe-file-thru-SAS-and-save-the-output/m-p/415263#M101818</guid>
      <dc:creator>tekish</dc:creator>
      <dc:date>2017-11-21T17:38:57Z</dc:date>
    </item>
    <item>
      <title>Re: execute .exe file thru SAS and save the output</title>
      <link>https://communities.sas.com/t5/SAS-Programming/execute-exe-file-thru-SAS-and-save-the-output/m-p/415266#M101820</link>
      <description>&lt;P&gt;How does this answer relate to the original question?&lt;/P&gt;</description>
      <pubDate>Tue, 21 Nov 2017 17:46:10 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/execute-exe-file-thru-SAS-and-save-the-output/m-p/415266#M101820</guid>
      <dc:creator>Tom</dc:creator>
      <dc:date>2017-11-21T17:46:10Z</dc:date>
    </item>
    <item>
      <title>Re: execute .exe file thru SAS and save the output</title>
      <link>https://communities.sas.com/t5/SAS-Programming/execute-exe-file-thru-SAS-and-save-the-output/m-p/415309#M101831</link>
      <description>&lt;P&gt;Tom,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;When I run the .exe I&amp;nbsp;have an excel output.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;thanks,&lt;/P&gt;</description>
      <pubDate>Tue, 21 Nov 2017 20:40:21 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/execute-exe-file-thru-SAS-and-save-the-output/m-p/415309#M101831</guid>
      <dc:creator>tekish</dc:creator>
      <dc:date>2017-11-21T20:40:21Z</dc:date>
    </item>
    <item>
      <title>Re: execute .exe file thru SAS and save the output</title>
      <link>https://communities.sas.com/t5/SAS-Programming/execute-exe-file-thru-SAS-and-save-the-output/m-p/415313#M101833</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/51471"&gt;@tekish&lt;/a&gt; wrote:&lt;BR /&gt;
&lt;P&gt;Tom,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;When I run the .exe I&amp;nbsp;have an excel output.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;thanks,&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;Do you mean that after running the program it leaves EXCEL running with the generated content as the currently open workbook?&lt;/P&gt;</description>
      <pubDate>Tue, 21 Nov 2017 20:49:33 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/execute-exe-file-thru-SAS-and-save-the-output/m-p/415313#M101833</guid>
      <dc:creator>Tom</dc:creator>
      <dc:date>2017-11-21T20:49:33Z</dc:date>
    </item>
    <item>
      <title>Re: execute .exe file thru SAS and save the output</title>
      <link>https://communities.sas.com/t5/SAS-Programming/execute-exe-file-thru-SAS-and-save-the-output/m-p/415515#M101912</link>
      <description>&lt;P&gt;Tom,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Yes.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 22 Nov 2017 14:10:33 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/execute-exe-file-thru-SAS-and-save-the-output/m-p/415515#M101912</guid>
      <dc:creator>tekish</dc:creator>
      <dc:date>2017-11-22T14:10:33Z</dc:date>
    </item>
  </channel>
</rss>

