Bookmark and Share

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


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: st: continue loop if file not found


From   Patricio Cuarón <[email protected]>
To   [email protected]
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
<[email protected]> 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/


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