× 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.



To order data in a User Space I built an array of pointers to each
entry, then sorted the array as desired:

D                       DS              Align
D PtrAry                32      Dim(100)
D ThePtr                  *   Inz(*Null) Overlay(PtrAry:1)
D The1stSortField        2A   Overlay(PtrAry:17)
D The2ndSortField        2A   Overlay(PtrAry:19)
D Filler                12A   Overlay(PtrAry:21)

(The filler is used to keep the pointers aligned on 16 bit boundries)

Once I've filled the array with pointers and data, I can sort by either
sort field and then retrieve the corresponding User Space entries -
thereby 'sorting' the user space

Hope it helps

JPW



-----Original Message-----
From: rpg400-l-bounces@xxxxxxxxxxxx
[mailto:rpg400-l-bounces@xxxxxxxxxxxx] On Behalf Of rob@xxxxxxxxx
Sent: Wednesday, 14 September 2005 7:19
To: RPG programming on the AS400 / iSeries
Subject: RE: Sorting a user space


The list api's use a user space.  I suppose I could read from the user 
space, write out to a user index and then load the subfile from the
keyed 
user index.

Rob Berendt

As an Amazon Associate we earn from qualifying purchases.

This thread ...

Follow-Ups:

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.