Statalist


[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]

Re: st: Log file named as do file


From   n j cox <n.j.cox@durham.ac.uk>
To   statalist@hsphsun2.harvard.edu
Subject   Re: st: Log file named as do file
Date   Wed, 31 Oct 2007 18:04:30 +0000

Something similar was asked recently on
the list, if I recall correctly.

There could be many .do files running
simultaneously, so I don't know how such
a macro would be defined.

You can do this just by another .do file:

----------------------- master.do
log using `1'.log
do `1'
log close
-----------------------

----------------------- oct31.do
<stuff>
-----------------------

. do master oct31

More elaborate solutions almost certainly exist.
It can be advantageous to program exactly what _you_ want.

Nick
n.j.cox@durham.ac.uk

mathew.stalker@dotecon.com

I'd like to be able to create log files with the same name as the do file
which has opened them.  Is there a macro which stores the name of the
current do file that is running?

*
*   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–2014 StataCorp LP   |   Terms of use   |   Privacy   |   Contact us   |   What's new   |   Site index