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



On 15-Jul-09, at 12:01 PM, midrange-l-request@xxxxxxxxxxxx wrote:

I have been asked to order a sub-file by a date, and plan to write to an array instead of the

subfile record until it fills, sort the array, and then load the subfile from this array.


1) Convert to RPG IV. Why leave it in RPG III? Any significant compatibility issues were resolved a long time ago and it is nuts to make updates to an RPG III program - the language has been obsolete for 12+ years.

2) Read this article http://www.ibmsystemsmag.com/ibmi/developer/8554p1.aspx

3) Once converted use either an Externally described DS or a DS defined with LikeRec of the subfile output record format. Add the DIM keyword to the DS to define it as an array.

4) Populate the subfile then add the name of the DS as the result field on the Write to the subfile.

5) To sort the subfile you have multiple options - you can use SORTA if you define the DS the right way - but qsort offers more flexibility.




Jon Paris

www.Partner400.com
www.SystemiDeveloper.com





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.