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 <[email protected]>
To   [email protected]
Subject   Re: st: Log file named as do file
Date   Wed, 31 Oct 2007 18:11:56 +0000

The memory surfaced. Check out Roger Newson's -dolog- from SSC.

n j cox wrote:
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
[email protected]

[email protected]

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