Notice: On April 23, 2014, Statalist moved from an email list to a forum, based at statalist.org.
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
st: Re: displaying input lines while executing loops
From
Christopher Baum <[email protected]>
To
"[email protected]" <[email protected]>
Subject
st: Re: displaying input lines while executing loops
Date
Tue, 31 Jul 2012 13:54:24 +0000
<>
On Jul 31, 2012, at 2:33 AM,Laszlo wrote:
> As a diligent follower of Kit Baum's advice (and many others' on this
> list), I use loops all the time, not to code up analogous things
> twice. But Stata just reporting barebones output does not help with
> this. E.g. when I am merging in many-many files (over data sources and
> over years), it is hard to keep track of the reports of the merges.
>
> Exactly because I have much code in loops, I would not edit the
> commands (in those loops) for this purpose. But is there another way?
Presuming you are running a loop over i, nothing stops you from something like
di as err _n "Now merging file `i'" _n
within the loop. That's not an input line, but you can put anything you want to see in the display statement (including a copy of the input line).
Kit
Kit Baum | Boston College Economics & DIW Berlin | http://ideas.repec.org/e/pba1.html
An Introduction to Stata Programming | http://www.stata-press.com/books/isp.html
An Introduction to Modern Econometrics Using Stata | http://www.stata-press.com/books/imeus.html
*
* 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/