× The internal search function is temporarily non-functional. The current search engine is no longer viable and we are researching alternatives.
As a stop gap measure, we are using Google's custom search engine service.
If you know of an easy to use, open source, search engine ... please contact support@midrange.com.



Scott:

I used what Alan Shore replied with except i used overlay (field:*Next) 
instead of specifying the starting pos

Use the following example

D                              ds
D      Myarray                                                   15
dim(10)
D      Field1                                                         5
overlay(myarray:1)
D      Field2                                                         5s 0
overlay(myarray:6)
D      Field3                                                         5
overlay(myarray:11)

then use

C                          sorta                     Myarray


Steve Jones



Scott Klement <rpg400-l@xxxxxxxxxxxxxxxx> 
Sent by: rpg400-l-bounces@xxxxxxxxxxxx
10/18/2005 11:54 AM
Please respond to
RPG programming on the AS400 / iSeries <rpg400-l@xxxxxxxxxxxx>


To
RPG programming on the AS400 / iSeries <rpg400-l@xxxxxxxxxxxx>
cc

Subject
Re: Sorting an array w/multiple fields








> I have the program written & using Sorta the results are not what I 
would
> have expected.  It sorts them -2, -4, -7, 0, 1, 4, 6   OK not sure why
> that is, but it does sort to some degree.

That's interesting.  It looks like it's sorting it as an unsigned binary 
integer.  Can we see a snippet that shows how you sorted this?  I'm just 
curious. AFIAK, you can't use SORTA to sort an array of data structures, 
but you did, somehow... I'm just curious how you made this work...


As an Amazon Associate we earn from qualifying purchases.

This thread ...

Follow-Ups:
Replies:

Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2024 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].

Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.