Stata The Stata listserver
[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]

st: RE: Date/time and "log close" after error message


From   "Nick Cox" <[email protected]>
To   <[email protected]>
Subject   st: RE: Date/time and "log close" after error message
Date   Tue, 2 Dec 2003 19:59:04 -0000

Your outermost .do file could be 

program mydo
	do whatever
	di c(current_date) " " c(current_time)
end 

so that when -whatever- finishes, you get 
a printing of date and time. You can build 
opening and closing a log into such a do file. 

Nick 
[email protected] 

P.S. as the 0th author of -findit- 
I was sad to read 

> As always, I have used "findit" to no avail.

but I hope that you mean 

> As always, I have used "findit", but to no avail.

Chih-Mao Hsieh

> I regularly program .do files that take hours or days to 
> run.  Sometimes they return error messages and I have to 
> debug them.  I wonder if there is a way to (1) output a 
> date and time at the time an error message appears (which 
> invariably stops my .do file from continuing), and (2) 
> close a log file that was started (preferably including the 
> error message and date/time; this allows me to access the 
> log file remotely to check its status)...
> 
> As always, I have used "findit" to no avail.


*
*   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