Notice: On April 23, 2014, Statalist moved from an email list to a forum, based at statalist.org.
From | Patricio Cuarón <patriciocuaron@gmail.com> |
To | statalist@hsphsun2.harvard.edu |
Subject | Re: st: continue loop if file not found |
Date | Fri, 6 May 2011 21:04:42 -0300 |
Thanks to you both. This is the code: capture noisily : use $HEREGOESTHEFILENAME, clear if _rc == 601 { continue, break } On Fri, May 6, 2011 at 5:54 PM, daniel klein <klein.daniel.81@googlemail.com> wrote: > I understand that you do not want the do file to terminate, so > -continue- (alone) will not help. > > You propably want to use -capture- prefix. > > Try to code somehting like: > > cap use filename`date'.dta > if _rc continue > > See -help capture- > > Best > Daniel > * > * 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/ > * * 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/