I don't think you could have found a more long winded way of coding than that chunk of code. What you really need is to use SQL update and select statements. I agree, it is definitely legacy code and probably the way you would have done it in the dark DOS days!
However if you are happy with it and it works....... well! It just isn't efficient. Dave -----Original Message----- From: [email protected] [mailto:[email protected]] On Behalf Of Kurt Wendt Sent: 19 April 2012 21:55 To: [email protected] Subject: RE: Are NESTED LOCATED Allowed? DARN - the Subject SHOULD have read "Nested Locates" - NOT a "D" but an "S" on the end. Since a Nest was NOT Actually Located! Anyway - TIA for any help on this. -K- -----Original Message----- From: [email protected] [mailto:[email protected]] On Behalf Of Kurt Wendt Sent: Thursday, April 19, 2012 4:44 PM Hey there Fox Gang, I actually looked in the Online Help before posting this question - and the help for the LOCATE Command is Skimpy at best. So - I am curious to know if its allowed - since I am doing it - but, the program is NOT giving me the proper results - and I am wondering if its because you are not actually Allowed to do Nested LOCATE/CONTINUE Commands! What do you all think? The clip of code is as follows: SELECT EDILN LOCATE FOR ORDER+STYLE+COLOR+STORE=xCurrORDER AND !EMPTY(mstrupcno) IF FOUND() * Next - find the pre-existing Live Order# already in the system. SELECT OrderHdr * Since it was found that Target sends PO#'s with a Dash inside it-and * to the right of the Dash is the Store - will now use a LOCATE and a * CONTinue since AIMS ends up storing only the 1st part of the * CustPO - as such, multiple Orders in the system will have the SAME PO#. LOCATE FOR account+custpo+order = 'TARGE'+xCurrCUSTPO DO WHILE FOUND() xExistingOrder = Order SELECT EDILN DO WHILE FOUND() SELECT OrderLn * Now - find the proper OrderLn record into which the data * will be Inserted! IF SEEK(xExistingOrder+EDILN.STYLE+EDILN.COLOR+EDILN.STORE); AND EMPTY(mstrupcno) REPLACE mstrupcno WITH EDILN.MstrUpcNo , ; MstrUpcQty WITH EDILN.MstrUpcQty, ; MstrUpcPrc WITH EDILN.MstrUpcPrc ENDIF SELECT EDILN CONTINUE ENDDO SELECT OrderHdr CONTINUE ENDDO ENDIF [excessive quoting removed by server] _______________________________________________ Post Messages to: [email protected] Subscription Maintenance: http://leafe.com/mailman/listinfo/profox OT-free version of this list: http://leafe.com/mailman/listinfo/profoxtech Searchable Archive: http://leafe.com/archives/search/profox This message: http://leafe.com/archives/byMID/profox/[email protected] ** All postings, unless explicitly stated otherwise, are the opinions of the author, and do not constitute legal or medical advice. This statement is added to the messages for those lawyers who are too stupid to see the obvious.

