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

st: DO file name macro


From   Eddy <[email protected]>
To   [email protected]
Subject   st: DO file name macro
Date   Thu, 22 Jul 2004 03:39:57 -0700 (PDT)

Dear listers,

Is there a built-in macro that register the name of the DO file that
is currently running? I wish to use it to print the file name to the
session log, so that when I looked at the log next time, I'll know
which DO file was used to generate the results.

That is, what I need is something like the (bogus) $FileName macro in
the following example, which should take the value of "example.do"
(with or without file path). Thus, when I open mylog.txt months
later, I'll know it is the result of running example.do.

====== example.do ==========
capture log close
log using mylog.txt

di "$FileName"

.......

============================

Forgive my ignorance if the question has been asked before -- I
searched but couldn't find the answer.

Thanks in advance,
Eddy


		
__________________________________
Do you Yahoo!?
New and Improved Yahoo! Mail - 100MB free storage!
http://promotions.yahoo.com/new_mail 
*
*   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