Actually - I 1st started re-writing the code due to a data issue. But,
in the end - that 1st re-write was not working. Now - based upon
everyone bashing the "Legacy code" - I updated it to proper code levels
- like Scan. And, now I ran it - and it works fine and does Exactly what
it should do. Here's the new code:

SELECT EDIHDR
SCAN 
        xCurrCUSTPO = CUSTPO
        xCurrORDER = ORDER
        SELECT OrderHdr
        IF !SEEK('TARGE'+xCurrCUSTPO)
                LOOP 
        ENDIF 
        SCAN REST FOR account+custpo+order = 'TARGE'+xCurrCUSTPO
                xExistingOrder = Order
                SELECT EDILN
                SCAN FOR ORDER+STYLE+COLOR+STORE=xCurrORDER ;
                                AND !EMPTY(mstrupcno)
                        SELECT OrderLn
                        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 
                ENDSCAN 
        ENDSCAN 
ENDSCAN

FYI - the main DBF's - OrderLn & OrderHdr are BIG ones - while EdiLn &
EdiHdr are small and Temp files...

-K-


-----Original Message-----
From: [email protected] [mailto:[email protected]]
On Behalf Of Man-wai Chang
Sent: Friday, April 20, 2012 10:27 AM

Re-writing a working procedure? Don't do it unless you found something
really wrong, e.g., performance.
You have to make sure nothing will be broken and go through all test
cases!

The best solution is to use a good SQL statement to do everything,
finding out whether Rushmore can help!

On Fri, Apr 20, 2012 at 6:20 PM, Kurt @ VR-FX <[email protected]>
wrote:
> Jeepers folks - I already said I was going to rewrite it - 10
responses
> telling me the same thing is already Beating a Dead Horse by now! But
-
> if it makes you all feel better to keep on beating that Dead Horse -
> then just go ahead and keep doing it...

-- 

_______________________________________________
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/289ea162f5642645b5cf64d624c66a140e260...@us-ny-mail-002.waitex.net
** 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.

Reply via email to