Statalist


[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]

Re: st: Advanced use of the shell command


From   "Sergiy Radyakin" <[email protected]>
To   [email protected]
Subject   Re: st: Advanced use of the shell command
Date   Thu, 26 Jun 2008 11:24:15 -0400

Hello Roy,

thank you for your interest. However, shellout uses winexec, and hence
does not wait for the program that has been launched to complete. The
OS (command processor) does wait, but this happens in parallel to the
Stata process, which continues executing the do file. An old trick to
organize a wait is to wait for a marker file to be created, but this
may never happen if the process being launched crashes. (I may not
know in advance, how much time it will need for FooBar.exe to
complete, hence timeouts are not applicable).

I also don't see how the "<" can make a difference. Try:
dir
dir /s
dir /s < nul

Using "<" with a parameters file does not replace the parameters
already present in the command line. hence the last two commands will
produce the same output, even though it is (generally) different from
the output of the first command. So I can't remove /C which is added
by Stata in the command line, unless I can change the code of
FooBar.exe to skip the first parameter.

But, just out of curiosity, what is a "Windows clone running on Linux"?


Thank you,
   Sergiy Radyakin



On 6/26/08, Roy Wada <[email protected]> wrote:
>
> >I have three questions regarding the use of the shell command in Stata
> >for Windows. This is rather technical, and might be interested to just
> >a few readers, but I would really want to know the answers.
>
> -shellout- might take you halfway there. The codes are posted here:
>
> http://datasets.org/statalist/archive/2007-11/msg00923.html
> http://datasets.org/statalist/archive/2007-11/msg00990.html
>
> Note that "<" is a way to upload predefined parameters from a text file.
>
> Someone told me it doesn't work on a Windows clone running on Linux.
> It works fine on my Windows XP machine.
>
> The latest version on SSC (bundled under -outreg2-) comes with a
> help file.
>
> Roy
>
> _________________________________________________________________
> Need to know now? Get instant answers with Windows Live Messenger.
> http://www.windowslive.com/messenger/connect_your_way.html?ocid=TXT_TAGLM_WL_Refresh_messenger_062008
> *
> *   For searches and help try:
> *   http://www.stata.com/support/faqs/res/findit.html
> *   http://www.stata.com/support/statalist/faq
> *   http://www.ats.ucla.edu/stat/stata/
>
*
*   For searches and help try:
*   http://www.stata.com/support/faqs/res/findit.html
*   http://www.stata.com/support/statalist/faq
*   http://www.ats.ucla.edu/stat/stata/



© Copyright 1996–2024 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   What's new   |   Site index