Such a program would need to find the error messages
and then delete text backwards of that. Given the
variety of error messages, my guess is that this
would be better built in a scripting language or
as a good text editor macro or script. Then again
there would have to be safeguards that good stuff
would not be deleted.
Sounds challenging to me. Either way, if it existed, why
would the author keep quiet about such an achievement?
My guess is that Robert is way too far downstream.
A better bet for now is to keep -cmdlog- as well as
-log-, and edit them in parallel, removing the commands
that offend.
When I do this, it is not the syntax errors that are
the main problem, although there are plenty. It is the
commands that are just repetitions and dead ends, but
perfectly legal.
Nick
[email protected]
Maarten Buis
> ----Robert A Yaffee wrote:
> > Does anyone know of a Stata do-file or ado-file program that will go
> > through your log file, find the syntactical errors, and remove those
> > errors along with the commands that generated them, leaving a
> > syntactically perfect output?
> > Once such garbage is removed, it's easier to check over the
> output for
> > other errors.
>
> Bob:
> It is not exactly what you are looking for and if your
> programs take long
> to run than this is not very efficient but something like
> this may help:
>
> *-----------begin example------------
> program valid
> capture `0'
> if !_rc `0'
> end
>
> sysuse auto
> set trace on
> valid reg bla blub
> valid reg price mpg foreign
> *-----------end example-------------
*
* 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/