[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]
Re: st: problem with sleep / winexec / shell
I suspect that Stata is "pausing" by running an arbitrary loop that
checks sytem time. when I issue -sleep 10000- I get 10 seconds of
~50% CPU utilization by Stata. This, of course, is inefficient,
especially if the winexeced program takes a lot of CPU itself.
What you might consider doing is turning the problem inside out.
You basically have a program that goes:
1) Part A
2) winexec external program and create file
3) Part B with requiring the new file
Consider running Stata from a shell using commands in this form:.
Stata /e do PartA.do (do the first part)
extpgm.exe (run the program that creates the file)
Stata /e do PartB
For windows from NT onward you could put this together with:
[path]stata.exe /do PartA.do && [path]extpgm.exe && [path]stata.exe
/do PartB.do and run it as a command script. the && combine the
commands and run them in sequence.
* For searches and help try: