Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
DO WHILE or SCAN Nesting Error
Message
From
31/08/2008 10:54:32
Jay Johengen
Altamahaw-Ossipee, North Carolina, United States
 
 
To
All
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Title:
DO WHILE or SCAN Nesting Error
Environment versions
Visual FoxPro:
VFP 9 SP2
Miscellaneous
Thread ID:
01343634
Message ID:
01343634
Views:
95
UPDATE: Nevermind. Doh! I used ENDIF instead of ENDDO or ENDSCAN. Wonder if this is why people don't usually work on Sundays...

I've tried SCAN as well as the DO WHILE below, but I still get a nesting error on that line. The values are all valid. I've tried moving the parenthesis around, etc, but no good. This is in a testing PRG, so it is not being called from anywhere exept the command window. What is going on?
CLOSE DATABASES
CLOSE ALL
CLEAR ALL
RELEASE ALL
CLEAR 

m_prom_dir = 'c:\fmsrun\prompt\'

SET STEP ON

			************************************************************************
			* JJ - Eligibility Project
			* Put code to delete/pack WorkList and WorkList_Detail tables here?
			************************************************************************
			IF !USED('WorkList')
				USE (m_prom_dir) + 'WORKLIST' EXCLUSIVE IN 0
			ENDIF

			IF !USED('WorkList_Detail')
				USE (m_prom_dir) + 'WORKLIST_DETAIL' EXCLUSIVE IN 0
			ENDIF

			SELECT WorkList
			DO WHILE (WorkList.TransDt < (DATETIME() -90)) AND WorkList.Archive = .T.
				SELECT WorkList_Detail
				DELETE FOR WorkList_Detail.TransID = WorkList.TransID
				SELECT WorkList
				DELETE
				SKIP
			ENDIF

			SELECT WorkList_Detail
			PACK
			USE IN WORKLIST_DETAIL

			SELECT WorkList
			PACK
			USE IN WORKLIST
			************************************************************************
Next
Reply
Map
View

Click here to load this message in the networking platform