Try this for an easy sorted list assuming field 6 is the field to sort on:

0001: PA
0002: SELECT MYFILE SAVING EVAL "@RECORD<6>:'|':@ID"
0003: SAVE.LIST MYLIST
0004: SH -c 'sort "&SAVEDLISTS&"/MYLIST > "&SAVEDLISTS&"/MYLIST.OUT'

You can then do a REANEXT and FIELD the key in a program after executing
"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 construct.
>
> No, I have to admit that I haven't .. In order to use LOCATE, I have to
> transpose my data:
>
> >REC<1> = A]W]1]5]15
> >REC<2> = B]X]2]6]25
> >REC<3> = C]Y]3]7]100
> >REC<4> = D]Z]4]8]11
>
> to
>
> REC<1> = A]B]C]D
> REC<2> = W]X]Y]Z
> REC<3> = 1]2]3]4
> REC<4> = 5]6]7]8
> REC<5> = 15]25]100]11
>
> I think this (and some version of the SHELL sort or DIMmed arrays) will
work
> for me ..
>
> Thanks for all of the help everyone ..
> -Chuck
> -------
> u2-users mailing list
> [EMAIL PROTECTED]
> To unsubscribe please visit http://listserver.u2ug.org/
-------
u2-users mailing list
[EMAIL PROTECTED]
To unsubscribe please visit http://listserver.u2ug.org/

Reply via email to