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




Thanks for the input, all.

Cannot use a logical file, the input comes mostly from called routines.



The program is NOW converted to RPGIV.

Had to discuss this with the client, first.
Copybooks are the concern there.



The LikeRec is intriguing to me. Just a LikeRec and a move, and I have my record defined.



D NewBal DS LikeRec(SrcBal:*Key)

Dim(999)



and



Eval-Corr NewBal = SrcBal;



gets my SrcBal record into NewBal.

Probably needs an index, I guess:



Eval-Corr NewBal(index) = SrcBal;



toodles,

- Dan




From: jon.paris@xxxxxxxxxxxxxx
To: midrange-l@xxxxxxxxxxxx
Subject: Re: Sorting an array to sequence a sub-file
Date: Wed, 15 Jul 2009 12:56:48 -0400

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.


_________________________________________________________________
Insert movie times and more without leaving Hotmail®.
http://windowslive.com/Tutorial/Hotmail/QuickAdd?ocid=TXT_TAGLM_WL_HM_Tutorial_QuickAdd_062009

As an Amazon Associate we earn from qualifying purchases.

This thread ...

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.