|
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
--
This is the Midrange Systems Technical Discussion (MIDRANGE-L) mailing list
To post a message email: MIDRANGE-L@xxxxxxxxxxxx
To subscribe, unsubscribe, or change list options,
visit: http://lists.midrange.com/mailman/listinfo/midrange-l
or email: MIDRANGE-L-request@xxxxxxxxxxxx
Before posting, please take a moment to review the archives
at http://archive.midrange.com/midrange-l.
As an Amazon Associate we earn from qualifying purchases.
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.