RE: [U2] merge sort

2004-07-27 Thread Chuck Mongiovi
Just to avoid the obvious question, you have tried using the LOCATE and INSERT commands? If not this is an easy to use construct. No, I have to admit that I haven't .. In order to use LOCATE, I have to transpose my data: REC1 = A]W]1]5]15 REC2 = B]X]2]6]25 REC3 = C]Y]3]7]100 REC4 = D]Z]4]8]11

RE: [U2] merge sort

2004-07-27 Thread TPellitieri
Chuck, I agree with Stuart - using a work file would speed things up. Here's a quick code outline to help (I use UniData, and haven't tried to run this, so YMMV): OPEN MYFILE TO F.MYFILE ELSE STOP OPEN WORKFILE TO F.WORK ELSE STOP EXECUTE CLEARFILE DATA WORKFILE READ REC FROM F.MYFILE,MYREC ELSE

Re: [U2] merge sort

2004-07-27 Thread Stu Glancy
GET.LIST MYLIST.OUT. - Original Message - From: Chuck Mongiovi [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Tuesday, July 27, 2004 8:28 AM Subject: RE: [U2] merge sort Just to avoid the obvious question, you have tried using the LOCATE and INSERT commands? If not this is an easy to use

Re: [U2] merge sort

2004-07-27 Thread Stu Glancy
] To: [EMAIL PROTECTED] Sent: Tuesday, July 27, 2004 9:46 AM Subject: Re: [U2] merge sort Try this for an easy sorted list assuming field 6 is the field to sort on: 0001: PA 0002: SELECT MYFILE SAVING EVAL @RECORD6:'|':@ID 0003: SAVE.LIST MYLIST 0004: SH -c 'sort SAVEDLISTS/MYLIST SAVEDLISTS

RE: [U2] merge sort

2004-07-26 Thread Chuck Mongiovi
] Behalf Of Rosenberg Ben Sent: Friday, July 23, 2004 6:34 PM To: '[EMAIL PROTECTED]' Subject: RE: [U2] merge sort EXECUTE MERGE.LIST 0 UNION 0 TO 0 will sort and de-dupe the current select list. -Original Message- From: Chuck Mongiovi Does anyone know where I can get code for a generic

RE: [U2] merge sort

2004-07-26 Thread Charlie Rubeor
] Subject: RE: [U2] merge sort I want a merge sort for data in BASIC, not lists. For example (] is an @VM) REC1 = A]B]C]D]15 REC2 = A]B]C]D]25 REC3 = A]B]C]D]100 REC4 = A]B]C]D]11 I want to sort by multi-value #5 .. The sorting isn't the issue .. It's when DCOUNT(REC,@AM) gets large that the whole

RE: [U2] merge sort

2004-07-26 Thread Chuck Mongiovi
] [mailto:[EMAIL PROTECTED] Behalf Of Charlie Rubeor Sent: Monday, July 26, 2004 10:46 AM To: [EMAIL PROTECTED] Subject: RE: [U2] merge sort Do you need this for a unix platform? This would not qualify as a generic BASIC merge/sort, but you could shell to the unix sort command for this sort of stuff

Re: [U2] merge sort

2004-07-26 Thread Allen Egerton
On Mon, 26 Jul 2004 09:03:38 -0400, you wrote: I want a merge sort for data in BASIC, not lists. For example (] is an @VM) REC1 = A]B]C]D]15 REC2 = A]B]C]D]25 REC3 = A]B]C]D]100 REC4 = A]B]C]D]11 I want to sort by multi-value #5 .. The sorting isn't the issue .. It's when DCOUNT(REC,@AM) gets

RE: [U2] merge sort

2004-07-26 Thread Allen E. Elwood \(CA\)
: Re: [U2] merge sort On Mon, 26 Jul 2004 09:03:38 -0400, you wrote: I want a merge sort for data in BASIC, not lists. For example (] is an @VM) REC1 = A]B]C]D]15 REC2 = A]B]C]D]25 REC3 = A]B]C]D]100 REC4 = A]B]C]D]11 I want to sort by multi-value #5 .. The sorting isn't the issue .. It's when

RE: [U2] merge sort

2004-07-26 Thread Stuart Boydell
: Monday, 26 July 2004 23:04 To: [EMAIL PROTECTED] Subject: RE: [U2] merge sort I want a merge sort for data in BASIC, not lists. For example (] is an @VM) REC1 = A]B]C]D]15 REC2 = A]B]C]D]25 REC3 = A]B]C]D]100 REC4 = A]B]C]D]11 I want to sort by multi-value #5 .. The sorting isn't

RE: [U2] merge sort

2004-07-23 Thread Doyen Klein
Chuck, if what you wanted was to look at the code to see how it's done this won't help but. AD for MERGE.LIST I've used MERGE.LIST which is very effective. I've written programs which sort and merge many subsets just by executing this utilities and then doing the good ol' READLIST. SELECT

RE: [U2] merge sort

2004-07-23 Thread Rosenberg Ben
EXECUTE MERGE.LIST 0 UNION 0 TO 0 will sort and de-dupe the current select list. -Original Message- From: Chuck Mongiovi Does anyone know where I can get code for a generic BASIC Merge SORT routine? -Chuck --- The information contained in this e-mail message may be