John,
That is an indication there is likely something amiss in your IF block before the ELSE, or between ELSE and ENDIF. Have you RStyled the code? Look for extra/missing quotes, parens, etc. Emmitt Dove Manager, DairyPak Business Systems Evergreen Packaging, Inc. [EMAIL PROTECTED] [EMAIL PROTECTED] (203) 643-8022 From: [email protected] [mailto:[EMAIL PROTECTED] On Behalf Of John Croson Sent: Wednesday, June 11, 2008 2:57 PM To: RBASE-L Mailing List Subject: [RBASE-L] - Noob question I know that this is pretty basic, but bear with me... I have an IF statement checking for the existence of a file, and keep getting strange -ERROR- ENDWHILE, ENDSW or ENDIF missing in an input file ( 462). The behavior is if sfh_tmp.txt exists, DO THIS processes, but it chokes on ELSE. If the file doesn't exist, it processes correctly. The same holds true with wff_tmp.txt. SET VAR vSf = (CHKFILE('sfh_tmp.txt')) IF vSf = 1 THEN DO THIS ELSE DO THAT END IF CLEAR VAR vSf SET VAR vWf = (CHKFILE('wff_tmp.txt')) IF vWf = 1 THEN DO NOTHING ELSE DO SOMETHING END IF CLEAR VAR vWf The variables are filling correctly, with a 1 if found, and 0 if not. TIA! -- John Croson [EMAIL PROTECTED] http://pcnorb.blogspot.com/ http://pcnorb.homelinux.org/

