Bookmark and Share

Notice: On March 31, it was announced that Statalist is moving from an email list to a forum. The old list will shut down at the end of May, and its replacement, statalist.org is already up and running.


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: st: executing commands on exit


From   Neil Shephard <n.shephard@sheffield.ac.uk>
To   statalist@hsphsun2.harvard.edu
Subject   Re: st: executing commands on exit
Date   Tue, 13 Sep 2011 14:23:21 +0100

On 13 September 2011 14:15, A. Berâ <abdullahbera@gmail.com> wrote:
> Yes but I also want to have closing date and time as we would see if
> we closed the log file manually.

Why have this as part of your "global" Stata session?

Common practice is to open a log-file at the start of your do-file and
then close it at the end of the do-file.

That will record the start and finish dates/times on which you run your do-file.

Having a log-file open as part of a Stata session could potentially
cause problems if you then try and run a do-file that records its own
log as you can't have two log-files open at a given time.

Is it much more effort to type five characters to close the log-file
prior to exiting?

. log c
. exit, clear

Neil



-- 
"To consult the statistician after an experiment is finished is often
merely to ask him to conduct a post mortem examination. He can perhaps
say what the experiment died of." ~ R.A. Fisher, Presidential Address
to the First Indian Statistical Congress, 1938

Neil Shephard
Clinical Trials Research Unit /
NIHR Research Design Service for Yorkshire & the Humber
University of Sheffield

*
*   For searches and help try:
*   http://www.stata.com/help.cgi?search
*   http://www.stata.com/support/statalist/faq
*   http://www.ats.ucla.edu/stat/stata/


© Copyright 1996–2014 StataCorp LP   |   Terms of use   |   Privacy   |   Contact us   |   Site index