ok .. i've finally gotten a little bit of time to play with this again and I
was *SHOCKED* at how fast it is .. no doubt it's because the OS handles the
LOCATE much faster than I could in BASIC .. the only changes I had to make
to the program were to use 0,0 instead of 1,1 as VMC/SVMC in the LOCATE, do
only 1 large EXTRACT (via LINE=REC<J>) and 1 small EXTRACT
(LOOK.FOR=LINE<1,5>) and *ALWAYS* do the INSERTS:

SORT.DATA = ""
SORT.INDEX = ""
SORT.COUNT = DCOUNT(REC,@AM)
*
FOR J = 1 TO SORT.COUNT
  LINE = REC<J>
  LOOK.FOR = LINE<1,5>
  LOCATE LOOK.FOR IN SORT.INDEX BY 'DR' SETTING FOUND ELSE NULL
  SORT.INDEX = INSERT(SORT.INDEX , FOUND, 0, 0, LOOK.FOR)
  SORT.DATA  = INSERT(SORT.DATA  , FOUND, 0, 0, LINE)
NEXT J

Thanks again ..
-CHuck
-------
u2-users mailing list
[EMAIL PROTECTED]
To unsubscribe please visit http://listserver.u2ug.org/

Reply via email to