In a message dated 10/29/2004 2:58:52 PM Pacific Daylight Time, [EMAIL PROTECTED] writes:
> DONELOK = 0 > LOOP UNTIL DONELOK = 1 DO > READU LOKREC FROM CUSTOMERFILE,CUSTID LOCKED > CRT TIMEDATE():\ port \:SYSTEM(18):\ file CUSTOMER item \:CUSTID:\locked!\ > ; SLEEP 1 > END THEN DONELOK = 1 ELSE LOKREC = '' ; DONELOK = 1 > REPEAT Notice, within the body of the loop you have three conditions and you are setting your flag in TWO of them. If you reverse your logic you can instead set the flag in ONE and also remove one conditional test entirely. See: LOOP DONELOCK = 1 READU LOKREC FROM CUSTOMERFILE,CUSTID LOCKED CRT TIMEDATE():\ port \:SYSTEM(18): CRT \ file CUSTOMER item \:CUSTID:\locked! SLEEP 1; DONELOK = 0 END ELSE LOKREC = '' WHILE NOT(DONELOCK) DO > REPEAT Will Johnson ------- u2-users mailing list [EMAIL PROTECTED] To unsubscribe please visit http://listserver.u2ug.org/