Hi,
I am using Stata 8.2 under Windows XP.  I want to have a .dofile call an
external program, wait for it to finish, and continue.  The problem is
this: if I call the external program using -winexec-, it takes about 15
seconds to run.  If I call it using -shell-, it takes at least several
minutes.  If I call it using -winexec-, and follow it in the dofile with
code like this:
capture confirm file `l_DummyOutputFileFullName'
while _rc != 0 {      
	sleep 10000   
	capture confirm file `l_DummyOutputFileFullName'
}
It again takes at least several minutes.
In the case of the -shell- call and the -while-, -sleep- construct,
wsestata.exe is still taking 90+% of CPU (according to Windows task
manager).
Can anybody suggest a solution?
Thanks,
Alex
    
This message is intended solely for the designated recipient(s). It may contain confidential or proprietary information and may be subject to confidentiality protections. If you are not a designated recipient, you may not review, copy, or distribute this message. If you receive this in error, please notify the sender by reply e-mail and delete this message. 
Arrowstreet Capital, L.P. is an Equal Opportunity Employer. 
*
*   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/