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



Don,

Is a different structure out of the question?  I've had great results with
Datastructure Arrays.

     D                 DS

     D $RptFilter                          Dim(20) Ascend

     D  $FiltVar                      5A   Overlay($RptFilter:1)

     D  $FiltCnd                      2A   Overlay($RptFilter:*Next)

     D  $FiltVal                     25A   Overlay($RptFilter:*Next)

Once data is loaded, you can sort on any subfield...

     C                   SortA     $FiltCnd
sorts the datastructure into ascending order by the $FiltCnd subfield.

I prefer this to MODS most of the time now.

hth,

Eric DeLong
Sally Beauty Company
MIS-Project Manager (BSG)
940-898-7863 or ext. 1863



-----Original Message-----
From: Fisher, Don [mailto:Dfisher@roomstoreeast.com]
Sent: Tuesday, November 12, 2002 1:04 PM
To: 'rpg400-l@midrange.com'
Subject: Sorting a Multi-occurrence data structure


I would like to sort a multi-occurrence data structure containing, say, four
fields, using the third field in the data structure.  After searching the
archives and reading the example in the "Sorcerer's Guide", it appears that
the QSORT routine needs the sort field to be the first in the data structure
as there is no parameter for the starting position and length of the sort
field.

The other alternative involves the use of an API called QLGSORT, but I'm
leery of that as I have not done any API programming before.

Are there any other alternatives or does someone have an example of using
QLGSORT?

Thanks.

Donald R. Fisher, III
Project Manager
The Roomstore Furniture Company
(804) 784-7600 extension 2124
DFisher@roomstoreeast.com

_______________________________________________
This is the RPG programming on the AS400 / iSeries (RPG400-L) mailing list
To post a message email: RPG400-L@midrange.com
To subscribe, unsubscribe, or change list options,
visit: http://lists.midrange.com/cgi-bin/listinfo/rpg400-l
or email: RPG400-L-request@midrange.com
Before posting, please take a moment to review the archives
at http://archive.midrange.com/rpg400-l.




As an Amazon Associate we earn from qualifying purchases.

This thread ...


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.