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 <[email protected]>
To   [email protected]
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 thisdofile.do 

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

Ed.


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



--

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
http://www.fee.uva.nl/scholar/mdw/leuven

*
*   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