|
This is related to my earlier SQL challenge. The "ALLOCATION" calculation must be done in RPG, so sayeth the powers. By traditional methods that we have used here, we would write the records to the file with all the data except for the calculated ALLOCATION, since we have to know the total units for the group before calculating the ALLOCATION for each record in the group. Once we hit a "level break" (or a group break, I suppose, by SQL convention), we have to re-read the records just written for that group and calculate that record's allocation and update the record. So, in essence, 3 I/O for each record. Because there are some performance considerations with this app, I would like to collect the group's records in an array that has the same structure as the output file and, once the group break occurs, calculate the allocation for each record as it is written to the output file. Likely, I would never have more than 20 records to collect for any given group, but the resulting output file will have over 20,000 records in it. Unfortunately, although I'm sure that this has been discussed here, I am unable to come up with the magic combination of archive search words to find anything meaningful. A scan through the v5r2 RPG Reference PDF came up empty as well. Do I want some combination of LIKEREC and DIM? Advise welcomed! TIA, Dan __________________________________________________ Do you Yahoo!? The New Yahoo! Search - Faster. Easier. Bingo http://search.yahoo.com
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.