Statalist


[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]

Re: st: ERROR r(2) when update all


From   Maarten buis <[email protected]>
To   [email protected]
Subject   Re: st: ERROR r(2) when update all
Date   Sat, 30 Jun 2007 19:28:46 +0100 (BST)


--- Shrenik Shah <[email protected]> wrote:

> In order to update Stata 8 in the end, I needed to essentially try
> many times, because I would almost always get a "unexpected end of
> file" error. In the end, I just executed a .do file that said
> something like:
> forvalues i=1/500 {
>     capture update all
> }
> Unfortunately, capture suppresses output, so you won't know when it's
> done.  Moreover, you can't break out of the do file, since capture
> just moves to the next line if you click break.  There's probably a
> way around these things, but I didn't bother, since I just ran this
> do file overnight, and in the morning, Stata was indeed updated.  

local maxtry = 500
local i = 1
capture update all
while _rc != 0 & `i' <= `maxtry' {
    capture update all
    local `i++'
}
di "succeeded after `i' attempts"

Hope this helps,
Maarten

-----------------------------------------
Maarten L. Buis
Department of Social Research Methodology
Vrije Universiteit Amsterdam
Boelelaan 1081
1081 HV Amsterdam
The Netherlands

visiting address:
Buitenveldertselaan 3 (Metropolitan), room Z434

+31 20 5986715

http://home.fsw.vu.nl/m.buis/
-----------------------------------------


      ___________________________________________________________ 
Yahoo! Mail is the world's favourite email. Don't settle for less, sign up for
your free account today http://uk.rd.yahoo.com/evt=44106/*http://uk.docs.yahoo.com/mail/winter07.html 
*
*   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