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

Re: st: RE: Running do files one line at a time

From   Edwin Leuven <>
Subject   Re: st: RE: Running do files one line at a time
Date   Wed, 19 Jun 2002 16:45:19 +0200

> One trick is to intersperse commands to do things with -more-.

or save the following as domore.ado where stata can find it and call it with 
the full filename: domore 

(all commands should be on a single line though and multiline comments are not 
welcome either I think)


program define domore
args fn
tempname fh
file open `fh' using `"`fn'"', read
file read `fh' line
while r(eof)==0 {
	di as input ". `line'"
	file read `fh' line
file close `fh'


Edwin Leuven
Department of Economics
University of Amsterdam
Roetersstraat 11
1018 WB Amsterdam
the Netherlands
tel: +31 20 525 5241
fax: +31 20 525 4310

*   For searches and help try:

© Copyright 1996–2017 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   What's new   |   Site index