<?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: Trouble defining stdout when starting application from Win  in Intel® Fortran Compiler</title>
    <link>https://community.intel.com/t5/Intel-Fortran-Compiler/Trouble-defining-stdout-when-starting-application-from-Win-API/m-p/853525#M66774</link>
    <description>&lt;DIV style="margin:0px;"&gt;
&lt;DIV id="quote_reply" style="margin-top: 5px; width: 100%;"&gt;
&lt;DIV style="margin-left:2px;margin-right:2px;"&gt;Quoting - &lt;A href="https://community.intel.com/en-us/profile/299626"&gt;Leigh Wardle&lt;/A&gt;&lt;/DIV&gt;
&lt;DIV style="background-color:#E5E5E5; padding:5px;border: 1px; border-style: inset;margin-left:2px;margin-right:2px;"&gt;&lt;EM&gt;Hi all,&lt;BR /&gt;&lt;BR /&gt;I am trying to run my compiled application (compiled with IVF 11.1) via the Win API Shell function.&lt;BR /&gt;&lt;BR /&gt;The command line that I use with the Shell function is something like:&lt;BR /&gt;&lt;BR /&gt;"d:AppPathCIRCLY32.EXE" @ 1&amp;gt;"D:DataPathJobName.sto" 2&amp;gt;&amp;amp;1&lt;BR /&gt;&lt;BR /&gt;The task executes OK, except that there is no stdout file ("D:DataPathJobName.sto") created.&lt;BR /&gt;&lt;BR /&gt;If I run the same command line from a command prompt the correct stdout file is created.&lt;BR /&gt;&lt;BR /&gt;I'm puzzled!!!&lt;BR /&gt;&lt;BR /&gt;Regards,&lt;BR /&gt;Leigh&lt;BR /&gt;&lt;/EM&gt;&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;BR /&gt;You may want to try embedding this string in an additional set of quotes - sometimes the quote characters get stripped off and the string executed isn't what you expected.&lt;BR /&gt;</description>
    <pubDate>Wed, 07 Oct 2009 00:46:35 GMT</pubDate>
    <dc:creator>DavidWhite</dc:creator>
    <dc:date>2009-10-07T00:46:35Z</dc:date>
    <item>
      <title>Trouble defining stdout when starting application from Win API Shell function</title>
      <link>https://community.intel.com/t5/Intel-Fortran-Compiler/Trouble-defining-stdout-when-starting-application-from-Win-API/m-p/853524#M66773</link>
      <description>Hi all,&lt;BR /&gt;&lt;BR /&gt;I am trying to run my compiled application (compiled with IVF 11.1) via the Win API Shell function.&lt;BR /&gt;&lt;BR /&gt;The command line that I use with the Shell function is something like:&lt;BR /&gt;&lt;BR /&gt;"d:\AppPath\CIRCLY32.EXE" @ 1&amp;gt;"D:\DataPath\JobName.sto" 2&amp;gt;&amp;amp;1&lt;BR /&gt;&lt;BR /&gt;The task executes OK, except that there is no stdout file ("D:\DataPath\JobName.sto") created.&lt;BR /&gt;&lt;BR /&gt;If I run the same command line from a command prompt the correct stdout file is created.&lt;BR /&gt;&lt;BR /&gt;I'm puzzled!!!&lt;BR /&gt;&lt;BR /&gt;Regards,&lt;BR /&gt;Leigh&lt;BR /&gt;</description>
      <pubDate>Tue, 06 Oct 2009 22:26:54 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Fortran-Compiler/Trouble-defining-stdout-when-starting-application-from-Win-API/m-p/853524#M66773</guid>
      <dc:creator>Leigh_Wardle</dc:creator>
      <dc:date>2009-10-06T22:26:54Z</dc:date>
    </item>
    <item>
      <title>Re: Trouble defining stdout when starting application from Win</title>
      <link>https://community.intel.com/t5/Intel-Fortran-Compiler/Trouble-defining-stdout-when-starting-application-from-Win-API/m-p/853525#M66774</link>
      <description>&lt;DIV style="margin:0px;"&gt;
&lt;DIV id="quote_reply" style="margin-top: 5px; width: 100%;"&gt;
&lt;DIV style="margin-left:2px;margin-right:2px;"&gt;Quoting - &lt;A href="https://community.intel.com/en-us/profile/299626"&gt;Leigh Wardle&lt;/A&gt;&lt;/DIV&gt;
&lt;DIV style="background-color:#E5E5E5; padding:5px;border: 1px; border-style: inset;margin-left:2px;margin-right:2px;"&gt;&lt;EM&gt;Hi all,&lt;BR /&gt;&lt;BR /&gt;I am trying to run my compiled application (compiled with IVF 11.1) via the Win API Shell function.&lt;BR /&gt;&lt;BR /&gt;The command line that I use with the Shell function is something like:&lt;BR /&gt;&lt;BR /&gt;"d:AppPathCIRCLY32.EXE" @ 1&amp;gt;"D:DataPathJobName.sto" 2&amp;gt;&amp;amp;1&lt;BR /&gt;&lt;BR /&gt;The task executes OK, except that there is no stdout file ("D:DataPathJobName.sto") created.&lt;BR /&gt;&lt;BR /&gt;If I run the same command line from a command prompt the correct stdout file is created.&lt;BR /&gt;&lt;BR /&gt;I'm puzzled!!!&lt;BR /&gt;&lt;BR /&gt;Regards,&lt;BR /&gt;Leigh&lt;BR /&gt;&lt;/EM&gt;&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;BR /&gt;You may want to try embedding this string in an additional set of quotes - sometimes the quote characters get stripped off and the string executed isn't what you expected.&lt;BR /&gt;</description>
      <pubDate>Wed, 07 Oct 2009 00:46:35 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Fortran-Compiler/Trouble-defining-stdout-when-starting-application-from-Win-API/m-p/853525#M66774</guid>
      <dc:creator>DavidWhite</dc:creator>
      <dc:date>2009-10-07T00:46:35Z</dc:date>
    </item>
    <item>
      <title>Re: Trouble defining stdout when starting application from Win</title>
      <link>https://community.intel.com/t5/Intel-Fortran-Compiler/Trouble-defining-stdout-when-starting-application-from-Win-API/m-p/853526#M66775</link>
      <description>&lt;DIV style="margin:0px;"&gt;
&lt;DIV id="quote_reply" style="width: 100%; margin-top: 5px;"&gt;
&lt;DIV style="margin-left:2px;margin-right:2px;"&gt;Quoting - &lt;A href="https://community.intel.com/en-us/profile/142656"&gt;David White&lt;/A&gt;&lt;/DIV&gt;
&lt;DIV style="background-color:#E5E5E5; padding:5px;border: 1px; border-style: inset;margin-left:2px;margin-right:2px;"&gt;&lt;EM&gt;
&lt;DIV style="margin:0px;"&gt;&lt;/DIV&gt;
&lt;BR /&gt;You may want to try embedding this string in an additional set of quotes - sometimes the quote characters get stripped off and the string executed isn't what you expected.&lt;BR /&gt;&lt;/EM&gt;&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;BR /&gt;Thanks, David.&lt;BR /&gt;&lt;BR /&gt;I tried embedding this string in an additional set of quotes.&lt;BR /&gt;But that made the Shell function return TaskID=0 - meaning the task did not start.&lt;BR /&gt;&lt;BR /&gt;Regards,&lt;BR /&gt;Leigh</description>
      <pubDate>Wed, 07 Oct 2009 00:55:47 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Fortran-Compiler/Trouble-defining-stdout-when-starting-application-from-Win-API/m-p/853526#M66775</guid>
      <dc:creator>Leigh_Wardle</dc:creator>
      <dc:date>2009-10-07T00:55:47Z</dc:date>
    </item>
    <item>
      <title>Re: Trouble defining stdout when starting application from Win</title>
      <link>https://community.intel.com/t5/Intel-Fortran-Compiler/Trouble-defining-stdout-when-starting-application-from-Win-API/m-p/853527#M66776</link>
      <description>&lt;DIV style="margin:0px;"&gt;&lt;/DIV&gt;
Could you elaborate on "Win API Shell function". Are you referring to ShellExecute? &lt;BR /&gt;&lt;BR /&gt;The redirection that you are chasing is normally performed by cmd.exe, hence it "works" from a command prompt. Perhaps the API that you are calling does not invoke your program via cmd.exe or perform its own redirection processing. Try something along the lines of: &lt;BR /&gt;&lt;BR /&gt;cmd.exe /c "d:AppPathCIRCLY32.EXE" @ 1&amp;gt;"D:DataPathJobName.sto" 2&amp;gt;&amp;amp;1&lt;BR /&gt;&lt;BR /&gt;as the program to invoke (perhaps cmd.exe as the file with the rest, including the /c, as the parameters, depending on the particular API you are calling). Comments about requiring additional quotes (particularly around your original command line) may apply here as well. &lt;BR /&gt;&lt;BR /&gt;For light entertainment or further debugging, consider temporarily putting a call to the F2003 intrinsic GET_COMMAND in your program and writing the resulting command argument out to a file. If it contains the redirection bits then you know that the command line for your call is not being processed as you want by whatever api you are calling.&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Wed, 07 Oct 2009 05:00:00 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Fortran-Compiler/Trouble-defining-stdout-when-starting-application-from-Win-API/m-p/853527#M66776</guid>
      <dc:creator>IanH</dc:creator>
      <dc:date>2009-10-07T05:00:00Z</dc:date>
    </item>
    <item>
      <title>Re: Trouble defining stdout when starting application from Win</title>
      <link>https://community.intel.com/t5/Intel-Fortran-Compiler/Trouble-defining-stdout-when-starting-application-from-Win-API/m-p/853528#M66777</link>
      <description>&lt;DIV style="margin:0px;"&gt;
&lt;DIV id="quote_reply" style="width: 100%; margin-top: 5px;"&gt;
&lt;DIV style="margin-left:2px;margin-right:2px;"&gt;Quoting - &lt;A href="https://community.intel.com/en-us/profile/212570"&gt;IanH&lt;/A&gt;&lt;/DIV&gt;
&lt;DIV style="background-color:#E5E5E5; padding:5px;border: 1px; border-style: inset;margin-left:2px;margin-right:2px;"&gt;&lt;EM&gt; Could you elaborate on "Win API Shell function". Are you referring to ShellExecute? &lt;BR /&gt;&lt;BR /&gt;The redirection that you are chasing is normally performed by cmd.exe, hence it "works" from a command prompt. Perhaps the API that you are calling does not invoke your program via cmd.exe or perform its own redirection processing. Try something along the lines of: &lt;BR /&gt;&lt;BR /&gt;cmd.exe /c "d:AppPathCIRCLY32.EXE" @ 1&amp;gt;"D:DataPathJobName.sto" 2&amp;gt;&amp;amp;1&lt;BR /&gt;&lt;BR /&gt;as the program to invoke (perhaps cmd.exe as the file with the rest, including the /c, as the parameters, depending on the particular API you are calling). Comments about requiring additional quotes (particularly around your original command line) may apply here as well. &lt;BR /&gt;&lt;BR /&gt;For light entertainment or further debugging, consider temporarily putting a call to the F2003 intrinsic GET_COMMAND in your program and writing the resulting command argument out to a file. If it contains the redirection bits then you know that the command line for your call is not being processed as you want by whatever api you are calling.&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/EM&gt;&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;BR /&gt;Combining &lt;EM&gt;cmd.exe /c &lt;/EM&gt;and additional quotes (underlined below) around my original command worked!&lt;BR /&gt;&lt;BR /&gt;That is:&lt;BR /&gt;&lt;EM&gt;&lt;BR /&gt;cmd.exe /c &lt;SPAN style="text-decoration: underline;"&gt;"&lt;/SPAN&gt;"d:AppPathCIRCLY32.EXE" @ 1&amp;gt;"D:DataPathJobName.sto" 2&amp;gt;&amp;amp;1&lt;SPAN style="text-decoration: underline;"&gt;"&lt;/SPAN&gt;&lt;BR /&gt;&lt;/EM&gt;&lt;BR /&gt;Many thanks to &lt;A href="https://community.intel.com/../profile/212570/"&gt;IanH&lt;/A&gt; and &lt;A href="https://community.intel.com/../profile/142656/"&gt;David White&lt;/A&gt; for your help.&lt;BR /&gt;&lt;BR /&gt;Regards,&lt;BR /&gt;Leigh&lt;BR /&gt;</description>
      <pubDate>Wed, 07 Oct 2009 11:04:05 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Fortran-Compiler/Trouble-defining-stdout-when-starting-application-from-Win-API/m-p/853528#M66777</guid>
      <dc:creator>Leigh_Wardle</dc:creator>
      <dc:date>2009-10-07T11:04:05Z</dc:date>
    </item>
    <item>
      <title>Re: Trouble defining stdout when starting application from Win</title>
      <link>https://community.intel.com/t5/Intel-Fortran-Compiler/Trouble-defining-stdout-when-starting-application-from-Win-API/m-p/853529#M66778</link>
      <description>&lt;DIV style="margin:0px;"&gt;&lt;/DIV&gt;
&lt;BR /&gt;Leigh,&lt;BR /&gt;&lt;BR /&gt;As an extention to this, keep in the back of your mind that you can additionally use START. Start is particularly handy when you want to launch multiple concurrent processes.&lt;BR /&gt;&lt;BR /&gt;Jim Dempsey&lt;BR /&gt;</description>
      <pubDate>Wed, 07 Oct 2009 16:26:50 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Fortran-Compiler/Trouble-defining-stdout-when-starting-application-from-Win-API/m-p/853529#M66778</guid>
      <dc:creator>jimdempseyatthecove</dc:creator>
      <dc:date>2009-10-07T16:26:50Z</dc:date>
    </item>
    <item>
      <title>Re: Trouble defining stdout when starting application from Win</title>
      <link>https://community.intel.com/t5/Intel-Fortran-Compiler/Trouble-defining-stdout-when-starting-application-from-Win-API/m-p/853530#M66779</link>
      <description>&lt;DIV style="margin:0px;"&gt;
&lt;DIV id="quote_reply" style="width: 100%; margin-top: 5px;"&gt;
&lt;DIV style="margin-left:2px;margin-right:2px;"&gt;Quoting - &lt;A href="https://community.intel.com/en-us/profile/212570"&gt;IanH&lt;/A&gt;&lt;/DIV&gt;
&lt;DIV style="background-color:#E5E5E5; padding:5px;border: 1px; border-style: inset;margin-left:2px;margin-right:2px;"&gt;&lt;EM&gt; For light entertainment or further debugging, consider temporarily putting a call to the F2003 intrinsic GET_COMMAND in your program and writing the resulting command argument out to a file. If it contains the redirection bits then you know that the command line for your call is not being processed as you want by whatever api you are calling.&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/EM&gt;&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;BR /&gt;Just for the record, &lt;EM&gt;GET_COMMAND&lt;/EM&gt; now returns&lt;EM&gt; &lt;/EM&gt;"d:AppPathCIRCLY32.EXE" @&lt;BR /&gt;So it leaves off the redirection bits...</description>
      <pubDate>Wed, 07 Oct 2009 22:26:25 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Fortran-Compiler/Trouble-defining-stdout-when-starting-application-from-Win-API/m-p/853530#M66779</guid>
      <dc:creator>Leigh_Wardle</dc:creator>
      <dc:date>2009-10-07T22:26:25Z</dc:date>
    </item>
  </channel>
</rss>

