-
From: DAVID WADEMAN [EMAIL PROTECTED]
To: u2-users@listserver.u2ug.org
Sent: Tuesday, July 22, 2008 12:59 PM
Subject: RE: [U2] Basic SORT() Function not avail in UniVerse?
This is a UniData subroutine, but should work
SUBROUTINE B42.SORT.ARRAY(SORTED,ARRAY)
* Bubble sort
In message [EMAIL PROTECTED], MAJ
Programming [EMAIL PROTECTED] writes
I don't think that the sort/extract function alone is justification for
choosing dim arrays over dynamic arrays in programs.
Sure, for large array concepts/projects, DIM will prevail. But IMHO, for
data READ/WRITE, dynamic
[EMAIL PROTECTED]
To: u2-users@listserver.u2ug.org
Sent: Tuesday, July 22, 2008 12:59 PM
Subject: RE: [U2] Basic SORT() Function not avail in UniVerse?
This is a UniData subroutine, but should work
SUBROUTINE B42.SORT.ARRAY(SORTED,ARRAY)
* Bubble sort the elements of a dynamic array
@listserver.u2ug.org
Sent: Wednesday, July 23, 2008 10:35 AM
Subject: RE: [U2] Basic SORT() Function not avail in UniVerse?
I'd suggest this subroutine. Brief and to the point:
SUBROUTINE HUB.SORT.B (ITAB)
OTAB =
FOR X = 1 TO DCOUNT(ITAB,@AM)
ELEM = ITABX
LOCATE ELEM IN OTAB BY AL
Message -
From: Baakkonen, Rodney A (Rod) 46K [EMAIL PROTECTED]
To: u2-users@listserver.u2ug.org
Sent: Wednesday, July 23, 2008 3:48 PM
Subject: RE: [U2] Basic SORT() Function not avail in UniVerse?
I guess my point was a little off topic, as I was really calling
attention to performance issues
), then it's a nightmare and bound to omit one.
My 2 cents
Mark Johnson
- Original Message -
From: Baakkonen, Rodney A (Rod) 46K [EMAIL PROTECTED]
To: u2-users@listserver.u2ug.org
Sent: Wednesday, July 23, 2008 1:24 PM
Subject: RE: [U2] Basic SORT() Function not avail in UniVerse?
That is why
: RE: [U2] Basic SORT() Function not avail in UniVerse?
I think I like this one better than the Unix sort. It is really quick
too. However I'd suggest using the SORT.LIST instead of the
GET.LIST/MERGE.LIST:
SUBROUTINE HUB.SORT.C (ITAB)
SORT.KEY= tmpsortfile
SORT.KEY2 = @UID
And since no one has mentioned it yet, MERGE.LIST takes advantage of
Universe's built-in (a.k.a C) sorting ability.
SUBROUTINE SORT.ITEM(ITEM)
WRITELIST ITEM ON MYLIST
STMT =
STMT-1 = GET.LIST MYLIST
STMT-1 = MERGE.LIST 0 UNION 0
STMT-1 = SAVE.LIST MYLIST
READLIST ITEM
That is a nifty idea if your values are all the same type. It doesn't work
for 1-10:
EDIT.LIST MYLIST
New record.
: I
0001= 2
0002= 1
0003= 3
0004= 5
0005= 10
0006= 7
0007= 6
0008= 4
0009= 9
0010= 8
0011=
Bottom at line 10.
: FILE
MYLIST filed in file SAVEDLISTS.
GET.LIST MYLIST
10
I don't seem to have SORT.LIST on UV 10.1.14. Is it on a later version?
-Dianne
Dave Laansma wrote:
I think I like this one better than the Unix sort. It is really quick
too. However I'd suggest using the SORT.LIST instead of the
GET.LIST/MERGE.LIST:
SUBROUTINE HUB.SORT.C (ITAB)
] On Behalf Of Dianne Ackerman
Sent: Thursday, July 24, 2008 11:39 AM
To: u2-users@listserver.u2ug.org
Subject: Re: [U2] Basic SORT() Function not avail in UniVerse?
I don't seem to have SORT.LIST on UV 10.1.14. Is it on a later version?
-Dianne
Dave Laansma wrote:
I think I like this one better than
7:35 PM
To: u2-users@listserver.u2ug.org
Subject: RE: [U2] Basic SORT() Function not avail in UniVerse?
We had the same issue back in the 90's. So a clever guy (Ed) that worked
with us wrote a small C program (on Unix) to do the sort. This also
included controlling/dependants fields. Any universe
]
[mailto:[EMAIL PROTECTED] On Behalf Of Jeff Marcos
Sent: Tuesday, July 22, 2008 7:35 PM
To: u2-users@listserver.u2ug.org
Subject: RE: [U2] Basic SORT() Function not avail in UniVerse?
We had the same issue back in the 90's. So a clever guy (Ed) that worked
with us wrote a small C program (on Unix
]
[mailto:[EMAIL PROTECTED] On Behalf Of Dave Laansma
Sent: Wednesday, July 23, 2008 10:42 AM
To: u2-users@listserver.u2ug.org
Subject: RE: [U2] Basic SORT() Function not avail in UniVerse?
I've been experimenting and discovered something. Instead of waiting
until you have all (say) 100,000 elements
I've done research on sorting in the past, working with 100,000 to
1,000,000 element lists.
Allen: LOCATE's are faster, but only when you're dealing with less than
100 elements. Because LOCATE's must start at the beginning of a string
and traverse the entire length, they get slower and
@listserver.u2ug.org
Subject: RE: [U2] Basic SORT() Function not avail in UniVerse?
Hey, and don't forget to do a speed test. You know, because LOCATE is
coded
as part of the OS it just *might* be faster than bubble or speed sort
options.
In fact, this was a topic on this list about 3 or 4 years
Gozar
Sent: Wednesday, July 23, 2008 2:50 PM
To: u2-users@listserver.u2ug.org
Subject: Re: [U2] Basic SORT() Function not avail in UniVerse?
I've done research on sorting in the past, working with 100,000 to
1,000,000 element lists.
Allen: LOCATE's are faster, but only when you're dealing
-users@listserver.u2ug.org
Subject: Re: [U2] Basic SORT() Function not avail in UniVerse?
I've done research on sorting in the past, working with 100,000 to
1,000,000 element lists.
Allen: LOCATE's are faster, but only when you're dealing with less than
100 elements. Because LOCATE's must start
I too would be interested in your c function
Thanks
Symeon.
-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of David A. Green
Sent: 23 July 2008 19:58
To: u2-users@listserver.u2ug.org
Subject: RE: [U2] Basic SORT() Function not avail in UniVerse?
Jeff
@listserver.u2ug.org
Subject: RE: [U2] Basic SORT() Function not avail in UniVerse?
I too would be interested in your c function
Thanks
Symeon.
-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of David A. Green
Sent: 23 July 2008 19:58
To: u2-users@listserver.u2ug.org
PROTECTED]
To: u2-users@listserver.u2ug.org
Sent: Tuesday, July 22, 2008 10:50 AM
Subject: [U2] Basic SORT() Function not avail in UniVerse?
Hey,
I'm needing to SORT a dynamic array and apparently UniVerse doesn't have
this
Function.
Other MV implementations have this, such as D3 - The sort
David, thanks for the little challenge.
I took your code you suggested to try and created the below program:
Please feel free to comment or improve the code. Unfortunately I don't
have all day to refine (wish I could though).
Due to company policy, I can't at this point in time release any
To: 'u2-users@listserver.u2ug.org'
Subject: [U2] Basic SORT() Function not avail in UniVerse?
Hey,
I'm needing to SORT a dynamic array and apparently UniVerse
doesn't have this Function.
Other MV implementations have this, such as D3 - The sort()
function sorts an attribute or value
Baker
Off the top of my head:
FUNCTION SortArray(InArray, AllowDups)
Dc = DCount(InArray,@FM)
OutArray = ''
For I = 1 To Dc
Locate InArrayI In OutArray By AL Setting Pos Then
If AllowDups Then Ins InArrayI Before OutArrayPos
End Else
Ins InArrayI Before OutArrayPos
End
Next
Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Baker Hughes
Sent: Tuesday, July 22, 2008 10:51 AM
To: 'u2-users@listserver.u2ug.org'
Subject: [U2] Basic SORT() Function not avail in UniVerse?
Hey,
I'm needing to SORT a dynamic array and apparently UniVerse doesn't have
Thank you Bill, Brian Norman,
If I'm allowed to deploy a separate Function or Sub you've virtually coded it
for me.
-Baker
---
u2-users mailing list
u2-users@listserver.u2ug.org
To unsubscribe please visit http://listserver.u2ug.org/
PROTECTED] On Behalf Of Israel, John R.
Sent: 22 July 2008 18:26
To: 'u2-users@listserver.u2ug.org'
Subject: RE: [U2] Basic SORT() Function not avail in UniVerse?
Note that if the array is big, you would get much better performance by
loading it into a DIM array, so the sort of sort below, then put
-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Baker Hughes
Sent: Tuesday, July 22, 2008 10:51 AM
To: 'u2-users@listserver.u2ug.org'
Subject: [U2] Basic SORT() Function not avail in UniVerse?
Hey,
I'm needing to SORT a dynamic array and apparently UniVerse doesn't
: RE: [U2] Basic SORT() Function not avail in UniVerse?
Hey, and don't forget to do a speed test. You know, because LOCATE is
coded
as part of the OS it just *might* be faster than bubble or speed sort
options.
In fact, this was a topic on this list about 3 or 4 years ago and
someone
doing
29 matches
Mail list logo