>I can not get a nested if - endif routine to return
>control to parent do while - end do routine.
>Example follows:(Code was staggerd originally)
>
>DO WHILE .T.
IF EOF( )
EXIT
ENDIF
SEEK lookstor IN TEMPFLOW
IF FOUND( )
>? 'Hey, found this store'
DISPLAY FIELDS storeno, number, address, city, state, id
SKIP 1 IN 'NEWSTORE'
STORE (NEWSTORE.STORENO) to lookstor
STORE (NEWSTORE.STORENO) to AFTERlookstor
DISPLAY MEMORY LIKE look*
DISPLAY MEMORY LIKE AFTERlook*
ELSE
DO WHILE .T.
&& It is endless loop IF (lookstor = AFTERlookstor)
>? 'Store not found and will be sent to Newflow'
SELECT NEWSTORE
DIMENSION Cutflow(1,5)
SCATTER FIELDS Storeno, Number, Address, City, State, Zip, District TO Cutflow
SELECT NEWFLOW
INSERT INTO NEWFLOW FROM ARRAY Cutflow
SKIP 1 IN 'NEWSTORE'
>? 'Store was sent to NEWFLOW database'
STORE (NEWSTORE.STORENO) to lookstor
ELSE
***
Missed SKIP or EXIT here? LOOP
ENDIF
ENDDO
ENDIF
>ENDDO
You have to have conditional second loop: DO WHILE NOT EOF() or something else.
Edward Pikman
Independent Consultant