Bookmark and Share

Notice: On April 23, 2014, Statalist moved from an email list to a forum, based at

[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 Baum   |   Boston College Economics & DIW Berlin   |
                             An Introduction to Stata Programming  |
  An Introduction to Modern Econometrics Using Stata  |

*   For searches and help try:

© Copyright 1996–2018 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   Site index