Dimitriy -- this small wrapper program does the job for me. Just save it as
dol.ado, put it in your personal ado folder, and get use to typing dol
instead of do. Steve
program define dol
version 6.0
local file `1'
cap log close
do `file'
end
> -----Original Message-----
> From: Dimitriy V. Masterov [SMTP:[email protected]]
> Sent: Tuesday, March 04, 2003 2:18 PM
> To: '[email protected]'
> Subject: st: log close
>
> Hello,
>
> I was wondering if there is a way to automatically close the log file when
> there is a dofile error of some sort. I always forget to type -log close-
> and then I get an error when I run my corrected dofile when it gets to
> the -log using...- section.
>
> I realize this is a trivial problem, but I am rather absent-minded, and
> this causes me and my colleagues a lot of frustration.
>
> Thanks in advance for your help.
>
> Dimitriy V. Masterov
>
>
> *
> * 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/
The information contained in this document is intended only for the
addressee and is not necessarily the views nor the official
communication of the Department of Labour. All final/official papers
which are sent from the Department will be sent by non-electronic
means, on appropriate letterhead, signed by authorised personnel.
*
* 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/